From: Junio C Hamano Date: Tue, 6 Apr 2021 23:21:59 +0000 (-0700) Subject: Meta/cycle-run: avoid testing the same tree twice X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b51cb2e8fa6503f16cd95a73c7e5c65f3497a3a;p=thirdparty%2Fgit.git Meta/cycle-run: avoid testing the same tree twice --- diff --git a/cycle-run b/cycle-run index 6e8b352047..f2aa2ec636 100755 --- a/cycle-run +++ b/cycle-run @@ -41,24 +41,30 @@ test_it () { esac } +tested () { + # sign=$1 commit=$2 + egrep "^$OKNG $1($2|$(git rev-parse "$2^{tree}"))" .Cycle/log >/dev/null +} + test_them () { while read merge parent sides do case "$parent" in ?*) - egrep "^$OKNG M$merge" .Cycle/log >/dev/null && continue + tested M $merge && continue echo "TEST M $merge" + for tip in $sides do git rev-parse --verify --quiet "$tip" || continue - egrep "^$OKNG T$tip" .Cycle/log >/dev/null && continue + tested T $tip && continue echo "TEST $tip $merge" done ;; '') commit=$merge git rev-parse --verify --quiet "$commit" || continue - egrep "^$OKNG C$commit" .Cycle/log >/dev/null || + tested C $commit && continue echo "TEST C $commit" esac done | @@ -97,6 +103,7 @@ test_them () { OK=NG fi echo "$OK $type$commit $count" >>.Cycle/log + echo "$OK $type$(git rev-parse $commit^{tree}) $count" >>.Cycle/log echo >&2 "$count/$total $OK $subject" count=$(( $count - 1 )) done <.Cycle/plan