@@ -78,13 +78,13 @@ test_expect_success 'see if a branch still exists after git pack-refs --prune' '
7878test_expect_success ' see if git pack-refs --prune remove ref files' '
7979 git branch f &&
8080 git pack-refs --all --prune &&
81- ! test -f .git/refs/heads/f
81+ ! test_path_is_file .git/refs/heads/f
8282'
8383
8484test_expect_success ' see if git pack-refs --prune removes empty dirs' '
8585 git branch r/s/t &&
8686 git pack-refs --all --prune &&
87- ! test -e .git/refs/heads/r
87+ ! test_path_exists .git/refs/heads/r
8888'
8989
9090test_expect_success ' git branch g should work when git branch g/h has been deleted' '
@@ -128,43 +128,43 @@ test_expect_success 'test excluded refs are not packed' '
128128 git branch dont_pack2 &&
129129 git branch pack_this &&
130130 git pack-refs --all --exclude "refs/heads/dont_pack*" &&
131- test -f .git/refs/heads/dont_pack1 &&
132- test -f .git/refs/heads/dont_pack2 &&
133- ! test -f .git/refs/heads/pack_this'
131+ test_path_is_file .git/refs/heads/dont_pack1 &&
132+ test_path_is_file .git/refs/heads/dont_pack2 &&
133+ ! test_path_is_file .git/refs/heads/pack_this'
134134
135135test_expect_success ' test --no-exclude refs clears excluded refs' '
136136 git branch dont_pack3 &&
137137 git branch dont_pack4 &&
138138 git pack-refs --all --exclude "refs/heads/dont_pack*" --no-exclude &&
139- ! test -f .git/refs/heads/dont_pack3 &&
140- ! test -f .git/refs/heads/dont_pack4'
139+ ! test_path_is_file .git/refs/heads/dont_pack3 &&
140+ ! test_path_is_file .git/refs/heads/dont_pack4'
141141
142142test_expect_success ' test only included refs are packed' '
143143 git branch pack_this1 &&
144144 git branch pack_this2 &&
145145 git tag dont_pack5 &&
146146 git pack-refs --include "refs/heads/pack_this*" &&
147- test -f .git/refs/tags/dont_pack5 &&
148- ! test -f .git/refs/heads/pack_this1 &&
149- ! test -f .git/refs/heads/pack_this2'
147+ test_path_is_file .git/refs/tags/dont_pack5 &&
148+ ! test_path_is_file .git/refs/heads/pack_this1 &&
149+ ! test_path_is_file .git/refs/heads/pack_this2'
150150
151151test_expect_success ' test --no-include refs clears included refs' '
152152 git branch pack1 &&
153153 git branch pack2 &&
154154 git pack-refs --include "refs/heads/pack*" --no-include &&
155- test -f .git/refs/heads/pack1 &&
156- test -f .git/refs/heads/pack2'
155+ test_path_is_file .git/refs/heads/pack1 &&
156+ test_path_is_file .git/refs/heads/pack2'
157157
158158test_expect_success ' test --exclude takes precedence over --include' '
159159 git branch dont_pack5 &&
160160 git pack-refs --include "refs/heads/pack*" --exclude "refs/heads/pack*" &&
161- test -f .git/refs/heads/dont_pack5'
161+ test_path_is_file .git/refs/heads/dont_pack5'
162162
163163test_expect_success ' see if up-to-date packed refs are preserved' '
164164 git branch q &&
165165 git pack-refs --all --prune &&
166166 git update-ref refs/heads/q refs/heads/q &&
167- ! test -f .git/refs/heads/q
167+ ! test_path_is_file .git/refs/heads/q
168168'
169169
170170test_expect_success ' pack, prune and repack' '
0 commit comments