8 if (open my $git, '-|', 'git', @_) {
21 my $release_branch = git
(qw(rev-parse --abbrev-ref HEAD));
22 my $default_branch = system(qw(git show-ref --verify --quiet refs/heads/main)) ?
'master' : 'main';
24 if ($release_branch eq $default_branch) {
25 printf STDERR
"Please execute from a non-default branch\n";
29 open my $cherry, '-|', 'git', 'cherry', '-v', $release_branch, $default_branch;
31 while (defined(my $line = readline $cherry)) {
32 my ($id, $subject) = $line =~ m!^\+ ([a-f0-9]+) (.*)$!;
35 my $found = git
('log', '-1', '-E', "--grep=(backported|cherry picked) from commit $id");
38 my @files = split /\n/, git
('show', '--pretty=format:', '--name-only', $id);
39 next unless grep { !/\.pot?$/ } @files;
41 print "$id $subject\n";