From: Junio C Hamano Date: Sun, 15 Jan 2006 02:19:54 +0000 (-0800) Subject: The same duplicate build avoidance as in Doit. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=81246862e804f972136fa160ac7f08cdd1d51a59;p=git.git The same duplicate build avoidance as in Doit. Signed-off-by: Junio C Hamano --- diff --git a/DoKernelOrg b/DoKernelOrg index 0a4d98d0..16a34686 100755 --- a/DoKernelOrg +++ b/DoKernelOrg @@ -14,9 +14,30 @@ make clean >/dev/null 2>&1 && case "$1" in '') echo "* Building all" + branches='naster master maint' + + # Make sure naster is between master and pu if exists + if naster=`git rev-parse --verify refs/heads/naster 2>/dev/null` + then + master=`git rev-parse --verify refs/heads/master` && + pu=`git rev-parse --verify refs/heads/pu` && + MBM=`git merge-base --all $naster $master` && + MBN=`git merge-base --all $naster $pu` && + case ",$MBM,$MBN," in + ",$master,$naster,") ;; + *) echo >&2 "naster is not between master and pu" + exit 1 ;; + esac + # If naster is the same as pu, no point rebuilding pu. + case ",$naster,$pu," in + ",$pu,$naster,") ;; + *) branches="$branches pu" ;; + esac + fi + { nstalled=install - for branch in naster master maint pu + for branch in $branches do if git-rev-parse --verify refs/heads/$branch 2>/dev/null then