@@ -49,15 +49,15 @@ test_expect_success "fail to delete $m with stale ref" '
4949'
5050test_expect_success " delete $m " '
5151 git update-ref -d $m $B &&
52- ! test -f .git/$m
52+ test_path_is_missing .git/$m
5353'
5454rm -f .git/$m
5555
5656test_expect_success " delete $m without oldvalue verification" "
5757 git update-ref $m $A &&
5858 test $A = \$ (cat .git/$m ) &&
5959 git update-ref -d $m &&
60- ! test -f .git/$m
60+ test_path_is_missing .git/$m
6161"
6262rm -f .git/$m
6363
@@ -81,15 +81,15 @@ test_expect_success "fail to delete $m (by HEAD) with stale ref" '
8181'
8282test_expect_success " delete $m (by HEAD)" '
8383 git update-ref -d HEAD $B &&
84- ! test -f .git/$m
84+ test_path_is_missing .git/$m
8585'
8686rm -f .git/$m
8787
8888test_expect_success " deleting current branch adds message to HEAD's log" '
8989 git update-ref $m $A &&
9090 git symbolic-ref HEAD $m &&
9191 git update-ref -m delete-$m -d $m &&
92- ! test -f .git/$m &&
92+ test_path_is_missing .git/$m &&
9393 grep "delete-$m$" .git/logs/HEAD
9494'
9595rm -f .git/$m
@@ -98,7 +98,7 @@ test_expect_success "deleting by HEAD adds message to HEAD's log" '
9898 git update-ref $m $A &&
9999 git symbolic-ref HEAD $m &&
100100 git update-ref -m delete-by-head -d HEAD &&
101- ! test -f .git/$m &&
101+ test_path_is_missing .git/$m &&
102102 grep "delete-by-head$" .git/logs/HEAD
103103'
104104rm -f .git/$m
@@ -190,14 +190,14 @@ test_expect_success \
190190test_expect_success " delete $m (by HEAD) should remove both packed and loose $m " '
191191 git update-ref -d HEAD $B &&
192192 ! grep "$m" .git/packed-refs &&
193- ! test -f .git/$m
193+ test_path_is_missing .git/$m
194194'
195195rm -f .git/$m
196196
197197cp -f .git/HEAD .git/HEAD.orig
198198test_expect_success " delete symref without dereference" '
199199 git update-ref --no-deref -d HEAD &&
200- ! test -f .git/HEAD
200+ test_path_is_missing .git/HEAD
201201'
202202cp -f .git/HEAD.orig .git/HEAD
203203
@@ -207,7 +207,7 @@ test_expect_success "delete symref without dereference when the referred ref is
207207 git commit -m foo &&
208208 git pack-refs --all &&
209209 git update-ref --no-deref -d HEAD &&
210- ! test -f .git/HEAD
210+ test_path_is_missing .git/HEAD
211211'
212212cp -f .git/HEAD.orig .git/HEAD
213213git update-ref -d $m
@@ -242,7 +242,7 @@ test_expect_success '(not) create HEAD with old sha1' "
242242 test_must_fail git update-ref HEAD $A $B
243243"
244244test_expect_success " (not) prior created .git/$m " "
245- ! test -f .git/$m
245+ test_path_is_missing .git/$m
246246"
247247rm -f .git/$m
248248
@@ -280,28 +280,28 @@ test_expect_success \
280280test_expect_success " empty directory removal" '
281281 git branch d1/d2/r1 HEAD &&
282282 git branch d1/r2 HEAD &&
283- test -f .git/refs/heads/d1/d2/r1 &&
284- test -f .git/logs/refs/heads/d1/d2/r1 &&
283+ test_path_is_file .git/refs/heads/d1/d2/r1 &&
284+ test_path_is_file .git/logs/refs/heads/d1/d2/r1 &&
285285 git branch -d d1/d2/r1 &&
286- ! test -e .git/refs/heads/d1/d2 &&
287- ! test -e .git/logs/refs/heads/d1/d2 &&
288- test -f .git/refs/heads/d1/r2 &&
289- test -f .git/logs/refs/heads/d1/r2
286+ test_path_is_missing .git/refs/heads/d1/d2 &&
287+ test_path_is_missing .git/logs/refs/heads/d1/d2 &&
288+ test_path_is_file .git/refs/heads/d1/r2 &&
289+ test_path_is_file .git/logs/refs/heads/d1/r2
290290'
291291
292292test_expect_success " symref empty directory removal" '
293293 git branch e1/e2/r1 HEAD &&
294294 git branch e1/r2 HEAD &&
295295 git checkout e1/e2/r1 &&
296296 test_when_finished "git checkout master" &&
297- test -f .git/refs/heads/e1/e2/r1 &&
298- test -f .git/logs/refs/heads/e1/e2/r1 &&
297+ test_path_is_file .git/refs/heads/e1/e2/r1 &&
298+ test_path_is_file .git/logs/refs/heads/e1/e2/r1 &&
299299 git update-ref -d HEAD &&
300- ! test -e .git/refs/heads/e1/e2 &&
301- ! test -e .git/logs/refs/heads/e1/e2 &&
302- test -f .git/refs/heads/e1/r2 &&
303- test -f .git/logs/refs/heads/e1/r2 &&
304- test -f .git/logs/HEAD
300+ test_path_is_missing .git/refs/heads/e1/e2 &&
301+ test_path_is_missing .git/logs/refs/heads/e1/e2 &&
302+ test_path_is_file .git/refs/heads/e1/r2 &&
303+ test_path_is_file .git/logs/refs/heads/e1/r2 &&
304+ test_path_is_file .git/logs/HEAD
305305'
306306
307307cat > expect << EOF
0 commit comments