Skip to content

Commit 53ce7cc

Browse files
avargitster
authored andcommitted
rev-parse tests: don't ignore "git reflog" exit code
Amend a test added in 9c46c05 (rev-parse: tests git rev-parse --verify master@{n}, for various n, 2010-08-24) so that we'll stop ignoring the exit code of "git reflog" by having it on the left-hand-side of a pipe. Because of this I'd marked this test as passing under SANITIZE=leak in f442c94 (leak tests: mark some rev-parse tests as passing with SANITIZE=leak, 2021-10-31). As all of it except this specific test will now pass, let's skip it under the !SANITIZE_LEAK prerequisite. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8127a2b commit 53ce7cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t1503-rev-parse-verify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ test_expect_success 'use --default' '
132132
test_must_fail git rev-parse --verify --default bar
133133
'
134134

135-
test_expect_success 'main@{n} for various n' '
136-
N=$(git reflog | wc -l) &&
135+
test_expect_success !SANITIZE_LEAK 'main@{n} for various n' '
136+
git reflog >out &&
137+
N=$(wc -l <out) &&
137138
Nm1=$(($N-1)) &&
138139
Np1=$(($N+1)) &&
139140
git rev-parse --verify main@{0} &&

0 commit comments

Comments
 (0)