From: Junio C Hamano <junkio@cox.net>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] "sleep 1" sleeps too little on cygwin
Date: Wed, 18 Jan 2006 00:53:32 -0800 [thread overview]
Message-ID: <7vmzhtzzlf.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <81b0412b0601170325y60094b4w693ac37490c67410@mail.gmail.com> (Alex Riesen's message of "Tue, 17 Jan 2006 12:25:37 +0100")
Sorry, but the previous patch turns out to be bogus as well.
'touch' did not affect the timestamp of the symbolic link but
ended up creating a file pointed by it, and since we (hopefully)
correctly do lstat() not stat(), it did not have any good
effect. Here is an replacement.
-- >8 --
Subject: [PATCH] t4011: "sleep 1" sleeps too little on cygwin
This test depended on "sleep 1" not to return until the next
second boundary, to get a dirty index entry. An initial fix was
provided by Alex Riesen using a bashism $SECONDS, but make it a
bit more portable, and also work around a potential problem on a
filesystem with coarser-than-a-second timestamp granularity,
this patch fixes it a bit differently.
The test is checking if we correctly notice the stat changes,
and the timestamp is not the only thing we have in the stat part
of the index. This commit fixes the problem by leaving the
original symlink we create on the filesystem, so that it keeps
the inode number used for the original symlink in use, and then
create a second one which should get a different inode number.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
t/t4011-diff-symlink.sh | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
5f6849e7b60bc4908bf10a7946fd93d4aaaf9c35
diff --git a/t/t4011-diff-symlink.sh b/t/t4011-diff-symlink.sh
index e3ebf38..f0e3491 100755
--- a/t/t4011-diff-symlink.sh
+++ b/t/t4011-diff-symlink.sh
@@ -48,7 +48,7 @@ EOF
test_expect_success \
'diff removed symlink' \
- 'rm frotz &&
+ 'mv frotz nitfol &&
git-diff-index -M -p $tree > current &&
compare_diff_patch current expected'
@@ -58,8 +58,7 @@ EOF
test_expect_success \
'diff identical, but newly created symlink' \
- 'sleep 1 &&
- ln -s xyzzy frotz &&
+ 'ln -s xyzzy frotz &&
git-diff-index -M -p $tree > current &&
compare_diff_patch current expected'
--
1.1.3.gce7b
next prev parent reply other threads:[~2006-01-18 8:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-17 11:25 [PATCH] "sleep 1" sleeps too little on cygwin Alex Riesen
2006-01-18 1:41 ` Junio C Hamano
2006-01-18 13:50 ` Alex Riesen
2006-01-18 16:55 ` Junio C Hamano
2006-01-19 5:18 ` Christopher Faylor
2006-01-18 8:53 ` Junio C Hamano [this message]
2006-01-18 11:35 ` Johannes Schindelin
2006-01-18 17:00 ` Junio C Hamano
2006-01-18 18:52 ` Alex Riesen
2006-01-19 1:18 ` Junio C Hamano
2006-01-19 5:20 ` Christopher Faylor
2006-01-19 15:01 ` Alex Riesen
2006-01-19 18:24 ` Junio C Hamano
2006-01-19 22:13 ` Alex Riesen
2006-01-20 1:13 ` Junio C Hamano
2006-01-19 18:28 ` Christopher Faylor
2006-01-19 22:12 ` Alex Riesen
2006-01-19 22:25 ` Christopher Faylor
2006-01-20 1:13 ` Junio C Hamano
2006-01-20 3:35 ` Christopher Faylor
2006-01-20 15:23 ` Alex Riesen
2006-01-20 15:40 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vmzhtzzlf.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=raa.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.