From: Junio C Hamano Date: Wed, 19 Oct 2011 18:12:27 +0000 (-0700) Subject: Meta/CheckPush: allow jch to lag a bit behind next X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63462397c693faea4bc4b9dfaa50d2bd3340be9e;p=thirdparty%2Fgit.git Meta/CheckPush: allow jch to lag a bit behind next --- diff --git a/CheckPush b/CheckPush index 9280aae8e2..0f0ae5916e 100755 --- a/CheckPush +++ b/CheckPush @@ -29,4 +29,18 @@ do fi done -git diff --stat next jch +if next_tree=$(git rev-parse next^{tree}) && + next_equiv=$(git rev-list jch..pu | + xargs -n1 sh -c ' + echo $(git rev-parse $1^{tree}) $1 + ' - | sed -n -e "s/^$next_tree //p" + ) && + test -n "$next_equiv" +then + jch=$(git rev-list --first-parent master..jch | wc -l) && + pu=$(git rev-list --first-parent master..pu | wc -l) && + next=$(git rev-list --first-parent master..$next_equiv | wc -l) && + echo $jch..$next..$pu +else + git diff --stat next jch +fi