Skip to content

Commit

Permalink
t1200: work around a bug in some implementations of "find"
Browse files Browse the repository at this point in the history
"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 <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Dec 26, 2009
1 parent 902f235 commit 15caa41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t1200-tutorial.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ test_expect_success 'git repack' 'git repack'
test_expect_success 'git prune-packed' 'git prune-packed'
test_expect_success '-> only packed objects' '
git prune && # Remove conflict marked blobs
! find .git/objects/[0-9a-f][0-9a-f] -type f
test $(find .git/objects/[0-9a-f][0-9a-f] -type f -print 2>/dev/null | wc -l) = 0
'

test_done

0 comments on commit 15caa41

Please sign in to comment.