Skip to content

Commit 5df9140

Browse files
author
Junio C Hamano
committed
t4011: "sleep 1" is not enough on FAT
This test depended on "sleep 1" to be enough to dirty the index entry for a symlink. Alex noticed that on his Cygwin installation "sleep 1" was sometimes not enough, and after further discussion with Christopher Faylor, it was brought up that on FAT filesystem timestamp granularity is 2 seconds so sleeping 1 second is not enough. For now this patch takes an easy workaround of sleeping for 3 seconds. Very strictly speaking, POSIX requires lstat to fill only S_IFMT part of st_mode and st_size for symlinks, and depending on timestamp might be considered a bug, but we depend on that anyway, so it is better to test that. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 63be37b commit 5df9140

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t4011-diff-symlink.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ EOF
5858

5959
test_expect_success \
6060
'diff identical, but newly created symlink' \
61-
'sleep 1 &&
61+
'sleep 3 &&
6262
ln -s xyzzy frotz &&
6363
git-diff-index -M -p $tree > current &&
6464
compare_diff_patch current expected'

0 commit comments

Comments
 (0)