@@ -61,13 +61,13 @@ test_expect_success 'see if a branch still exists after git ${pack_refs} --prune
6161test_expect_success ' see if git ${pack_refs} --prune remove ref files' '
6262 git branch f &&
6363 git ${pack_refs} --all --prune &&
64- ! test -f .git/refs/heads/f
64+ test_path_is_missing .git/refs/heads/f
6565'
6666
6767test_expect_success ' see if git ${pack_refs} --prune removes empty dirs' '
6868 git branch r/s/t &&
6969 git ${pack_refs} --all --prune &&
70- ! test -e .git/refs/heads/r
70+ test_path_is_missing .git/refs/heads/r
7171'
7272
7373test_expect_success ' git branch g should work when git branch g/h has been deleted' '
@@ -111,43 +111,43 @@ test_expect_success 'test excluded refs are not packed' '
111111 git branch dont_pack2 &&
112112 git branch pack_this &&
113113 git ${pack_refs} --all --exclude "refs/heads/dont_pack*" &&
114- test -f .git/refs/heads/dont_pack1 &&
115- test -f .git/refs/heads/dont_pack2 &&
116- ! test -f .git/refs/heads/pack_this'
114+ test_path_is_file .git/refs/heads/dont_pack1 &&
115+ test_path_is_file .git/refs/heads/dont_pack2 &&
116+ test_path_is_missing .git/refs/heads/pack_this'
117117
118118test_expect_success ' test --no-exclude refs clears excluded refs' '
119119 git branch dont_pack3 &&
120120 git branch dont_pack4 &&
121121 git ${pack_refs} --all --exclude "refs/heads/dont_pack*" --no-exclude &&
122- ! test -f .git/refs/heads/dont_pack3 &&
123- ! test -f .git/refs/heads/dont_pack4'
122+ test_path_is_missing .git/refs/heads/dont_pack3 &&
123+ test_path_is_missing .git/refs/heads/dont_pack4'
124124
125125test_expect_success ' test only included refs are packed' '
126126 git branch pack_this1 &&
127127 git branch pack_this2 &&
128128 git tag dont_pack5 &&
129129 git ${pack_refs} --include "refs/heads/pack_this*" &&
130- test -f .git/refs/tags/dont_pack5 &&
131- ! test -f .git/refs/heads/pack_this1 &&
132- ! test -f .git/refs/heads/pack_this2'
130+ test_path_is_file .git/refs/tags/dont_pack5 &&
131+ test_path_is_missing .git/refs/heads/pack_this1 &&
132+ test_path_is_missing .git/refs/heads/pack_this2'
133133
134134test_expect_success ' test --no-include refs clears included refs' '
135135 git branch pack1 &&
136136 git branch pack2 &&
137137 git ${pack_refs} --include "refs/heads/pack*" --no-include &&
138- test -f .git/refs/heads/pack1 &&
139- test -f .git/refs/heads/pack2'
138+ test_path_is_file .git/refs/heads/pack1 &&
139+ test_path_is_file .git/refs/heads/pack2'
140140
141141test_expect_success ' test --exclude takes precedence over --include' '
142142 git branch dont_pack5 &&
143143 git ${pack_refs} --include "refs/heads/pack*" --exclude "refs/heads/pack*" &&
144- test -f .git/refs/heads/dont_pack5'
144+ test_path_is_file .git/refs/heads/dont_pack5'
145145
146146test_expect_success ' see if up-to-date packed refs are preserved' '
147147 git branch q &&
148148 git ${pack_refs} --all --prune &&
149149 git update-ref refs/heads/q refs/heads/q &&
150- ! test -f .git/refs/heads/q
150+ test_path_is_missing .git/refs/heads/q
151151'
152152
153153test_expect_success ' pack, prune and repack' '
0 commit comments