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 <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
Dec 20, 2019 at 10:15 UTC
f511bc02edc8e2729e7babb1b4caa98684d941bc
1 file changed
+2
-2
t/t1409-avoid-packing-refs.sh
+2
-2
@@ -46,7 +46,7 @@ test_expect_success 'check that marking the packed-refs file works' '
46
git for-each-ref >actual &&
47
test_cmp expected actual &&
48
git pack-refs --all &&
49
- test_must_fail check_packed_refs_marked &&
49
+ ! check_packed_refs_marked &&
50
git for-each-ref >actual2 &&
51
test_cmp expected actual2
52
'
@@ -80,7 +80,7 @@ test_expect_success 'touch packed-refs on delete of packed' '
80
git pack-refs --all &&
81
mark_packed_refs &&
82
git update-ref -d refs/heads/packed-delete &&
83
- test_must_fail check_packed_refs_marked
83
+ ! check_packed_refs_marked
84
'
85
86
test_expect_success 'leave packed-refs untouched on update of loose' '