6 git for-each-ref
--format='%(refname)' refs
/heads
/maint-
* |
8 sub compare_dotted_version {
9 my (@ours) = split(/\./, $_[0]);
10 my (@theirs) = split(/\./, $_[1]);
13 for ($i = 0; $i < @ours && $i < @theirs; $i++) {
14 $diff = $ours[$i] - $theirs[$i];
15 return $diff if ($diff);
17 return 1 if ($i < @ours);
18 return -1 if ($i < @theirs);
23 next unless s|^refs/heads/||;
25 my ($v) = ($_ =~ /^maint-(.*)$/);
26 push @maint, [$v, $_];
29 sort { compare_dotted_version($a->[0], $b->[0]) }
42 if test -n "$prev_branch"
44 echo "$branch..$prev_branch"
50 lg
=$
(git log
--oneline "$range")
58 if next_tree
=$
(git rev-parse next^
{tree
}) &&
59 next_equiv
=$
(git rev-list
--first-parent master..pu |
61 echo $(git rev-parse $1^{tree}) $1
62 ' - |
sed -n -e "s/^$next_tree //p"
66 jch
=$
(git rev-list
--first-parent master..jch |
wc -l) &&
67 pu
=$
(git rev-list
--first-parent master..pu |
wc -l) &&
68 next
=$
(git rev-list
--first-parent master..
$next_equiv |
wc -l) &&
69 if test $jch -le $next
71 echo "master..$jch..jch..$next..next..$pu..pu"
73 echo "master..$next..next..$jch..jch..$pu..pu"
76 echo "git diff --stat next jch"
77 git
diff --stat next jch