]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t6120: avoid hiding "git" exit status
authorJunio C Hamano <gitster@pobox.com>
Tue, 11 Mar 2025 21:25:03 +0000 (14:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Mar 2025 15:48:54 +0000 (08:48 -0700)
A handful of tests invoke "git" on the upstream side of a pipe,
hiding its exit status.  Correct them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6120-describe.sh

index 76843a61691cb5e22f5363e26ca382eceb821ce3..dcb526e37d4ea0522353313aebc195577eea7500 100755 (executable)
@@ -292,13 +292,15 @@ test_expect_success 'name-rev --annotate-stdin' '
                echo "$rev ($name)" >>expect.unsorted || return 1
        done &&
        sort <expect.unsorted >expect &&
-       git rev-list --all | git name-rev --annotate-stdin >actual.unsorted &&
+       git rev-list --all >list &&
+       git name-rev --annotate-stdin <list >actual.unsorted &&
        sort <actual.unsorted >actual &&
        test_cmp expect actual
 '
 
 test_expect_success 'name-rev --stdin deprecated' "
-       git rev-list --all | git name-rev --stdin 2>actual &&
+       git rev-list --all >list &&
+       git name-rev --stdin <list 2>actual &&
        grep -E 'warning: --stdin is deprecated' actual
 "