Skip to content

Commit 5b911a2

Browse files
avargitster
authored andcommitted
diff tests: don't ignore "git rev-list" exit code
Change a fragile pattern introduced in 2b459b4 (diff: make sure work tree side is shown as 0{40} when different, 2008-03-02) to check the exit code of "git rev-list", while we're at it let's get rid of the needless sub-shell for invoking it in favor of the "-C" option. Because of this I'd marked these tests as passing under SANITIZE=leak in 16d4bd4 (leak tests: mark some diff tests as passing with SANITIZE=leak, 2021-10-31), let's remove the "TEST_PASSES_SANITIZE_LEAK=true" annotation as they no longer do. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b6d775d commit 5b911a2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

t/t4027-diff-submodule.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
test_description='difference in submodules'
44

5-
TEST_PASSES_SANITIZE_LEAK=true
65
. ./test-lib.sh
76
. "$TEST_DIRECTORY"/lib-diff.sh
87

@@ -28,10 +27,8 @@ test_expect_success setup '
2827
git commit -m "submodule #2"
2928
) &&
3029
31-
set x $(
32-
cd sub &&
33-
git rev-list HEAD
34-
) &&
30+
git -C sub rev-list HEAD >revs &&
31+
set x $(cat revs) &&
3532
echo ":160000 160000 $3 $ZERO_OID M sub" >expect &&
3633
subtip=$3 subprev=$2
3734
'

0 commit comments

Comments
 (0)