Skip to content

Commit 15caa41

Browse files
committed
t1200: work around a bug in some implementations of "find"
"find path ..." command should exit with zero status only when all path operands were traversed successfully. When a non-existent path is given, however, some implementations of "find" (e.g. OpenBSD 4.6) exit with zero status and break the last test in t1200. Rewrite the test to check that there is no regular files in the objects fan-out directories to work around this bug; it is closer to what we are testing anyway. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 902f235 commit 15caa41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t1200-tutorial.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ test_expect_success 'git repack' 'git repack'
259259
test_expect_success 'git prune-packed' 'git prune-packed'
260260
test_expect_success '-> only packed objects' '
261261
git prune && # Remove conflict marked blobs
262-
! find .git/objects/[0-9a-f][0-9a-f] -type f
262+
test $(find .git/objects/[0-9a-f][0-9a-f] -type f -print 2>/dev/null | wc -l) = 0
263263
'
264264

265265
test_done

0 commit comments

Comments
 (0)