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>
This commit is contained in:

committed by
Junio C Hamano

parent
f6041abdcd
commit
f511bc02ed
@ -46,7 +46,7 @@ test_expect_success 'check that marking the packed-refs file works' '
|
|||||||
git for-each-ref >actual &&
|
git for-each-ref >actual &&
|
||||||
test_cmp expected actual &&
|
test_cmp expected actual &&
|
||||||
git pack-refs --all &&
|
git pack-refs --all &&
|
||||||
test_must_fail check_packed_refs_marked &&
|
! check_packed_refs_marked &&
|
||||||
git for-each-ref >actual2 &&
|
git for-each-ref >actual2 &&
|
||||||
test_cmp expected actual2
|
test_cmp expected actual2
|
||||||
'
|
'
|
||||||
@ -80,7 +80,7 @@ test_expect_success 'touch packed-refs on delete of packed' '
|
|||||||
git pack-refs --all &&
|
git pack-refs --all &&
|
||||||
mark_packed_refs &&
|
mark_packed_refs &&
|
||||||
git update-ref -d refs/heads/packed-delete &&
|
git update-ref -d refs/heads/packed-delete &&
|
||||||
test_must_fail check_packed_refs_marked
|
! check_packed_refs_marked
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'leave packed-refs untouched on update of loose' '
|
test_expect_success 'leave packed-refs untouched on update of loose' '
|
||||||
|
Reference in New Issue
Block a user