summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 63be37b)
raw | patch | inline | side by side (parent: 63be37b)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 20 Jan 2006 21:17:59 +0000 (13:17 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 22 Jan 2006 03:33:22 +0000 (19:33 -0800) |
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>
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>
t/t4011-diff-symlink.sh | patch | blob | history |
index e3ebf382e34b7e893c2fe12ff30376a9eb301142..379a831f0bd698273c695468f4d3a2c834b104c5 100755 (executable)
--- a/t/t4011-diff-symlink.sh
+++ b/t/t4011-diff-symlink.sh
test_expect_success \
'diff identical, but newly created symlink' \
- 'sleep 1 &&
+ 'sleep 3 &&
ln -s xyzzy frotz &&
git-diff-index -M -p $tree > current &&
compare_diff_patch current expected'