]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/cycle-run: draw a plan just once for both merges and individual commits
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Mar 2021 05:24:31 +0000 (22:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Mar 2021 05:24:31 +0000 (22:24 -0700)
cycle-run

index 5401de565a226d666e23ba1dbd00db7c15425e5a..e2675b0df0625d9a4d08465b2bb4568d96de2481 100755 (executable)
--- a/cycle-run
+++ b/cycle-run
@@ -73,11 +73,11 @@ test_them () {
                M)
                        type=M
                        commit=$merge
-                       subject=$(git show -s --format="%s" "$merge") ;;
+                       subject=$(git show -s --format="%s" "$commit") ;;
                C)
                        type=C
                        commit=$merge
-                       subject=$(git show -s --format="%s" "$merge") ;;
+                       subject=$(git show -s --format="%s" "$commit") ;;
                *)
                        type=T
                        commit=$tip
@@ -111,5 +111,7 @@ do
 done
 
 git fetch
-git rev-list --no-merges $RANGE | test_them
-git rev-list --first-parent --parents $RANGE | test_them
+(
+       git rev-list --no-merges $RANGE
+       git rev-list --first-parent --parents $RANGE
+) | test_them