Meta/CheckPush: allow jch to lag a bit behind next

Junio C Hamano committed Oct 19, 2011 at 11:12 UTC 63462397c693faea4bc4b9dfaa50d2bd3340be9e
1 file changed +15 -1
CheckPush
+15 -1
@@ -29,4 +29,18 @@ do
29 fi
30 done
31
32 -git diff --stat next jch
32 +if next_tree=$(git rev-parse next^{tree}) &&
33 + next_equiv=$(git rev-list jch..pu |
34 + xargs -n1 sh -c '
35 + echo $(git rev-parse $1^{tree}) $1
36 + ' - | sed -n -e "s/^$next_tree //p"
37 + ) &&
38 + test -n "$next_equiv"
39 +then
40 + jch=$(git rev-list --first-parent master..jch | wc -l) &&
41 + pu=$(git rev-list --first-parent master..pu | wc -l) &&
42 + next=$(git rev-list --first-parent master..$next_equiv | wc -l) &&
43 + echo $jch..$next..$pu
44 +else
45 + git diff --stat next jch
46 +fi