Skip to content

Commit f511bc0

Browse files
Denton-Lgitster
authored andcommitted
t0020: use ! check_packed_refs_marked
The test_must_fail function should only be used for git commands since we should assume that external commands work sanely. Since check_packed_refs_marked() just wraps a grep invocation, replace `test_must_fail check_packed_refs_marked` with `! check_packed_refs_marked`. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f6041ab commit f511bc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t1409-avoid-packing-refs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test_expect_success 'check that marking the packed-refs file works' '
4646
git for-each-ref >actual &&
4747
test_cmp expected actual &&
4848
git pack-refs --all &&
49-
test_must_fail check_packed_refs_marked &&
49+
! check_packed_refs_marked &&
5050
git for-each-ref >actual2 &&
5151
test_cmp expected actual2
5252
'
@@ -80,7 +80,7 @@ test_expect_success 'touch packed-refs on delete of packed' '
8080
git pack-refs --all &&
8181
mark_packed_refs &&
8282
git update-ref -d refs/heads/packed-delete &&
83-
test_must_fail check_packed_refs_marked
83+
! check_packed_refs_marked
8484
'
8585

8686
test_expect_success 'leave packed-refs untouched on update of loose' '

0 commit comments

Comments
 (0)