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: Tue, 17 Jan 2006 17:41:34 -0800 [thread overview]
Message-ID: <7vvewi2typ.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 81b0412b0601170325y60094b4w693ac37490c67410@mail.gmail.com
Alex Riesen <raa.lkml@gmail.com> writes:
> Probably another one windows quirk, or just the moon phases,
> but I have to make damn sure it sleeps long enough.
IIRC, DOS file timestamps have 2 seconds granularity, so
sleeping for one second might not be enough to begin with. Also
I run my cygwin test on sufficiently slow machine, so that may
explain why I have not notice the problem ;-).
Instead of depending on $SECONDS (isn't it a bashism?), how
about doing something like this?
---
diff --git a/t/t4011-diff-symlink.sh b/t/t4011-diff-symlink.sh
index e3ebf38..9a5fa38 100755
--- a/t/t4011-diff-symlink.sh
+++ b/t/t4011-diff-symlink.sh
@@ -23,6 +23,7 @@ EOF
test_expect_success \
'diff new symlink' \
'ln -s xyzzy frotz &&
+ touch -t 199901010000 frotz &&
git-update-index &&
tree=$(git-write-tree) &&
git-update-index --add frotz &&
@@ -58,8 +59,8 @@ EOF
test_expect_success \
'diff identical, but newly created symlink' \
- 'sleep 1 &&
- ln -s xyzzy frotz &&
+ 'ln -s xyzzy frotz &&
+ touch -t 200201010000 frotz &&
git-diff-index -M -p $tree > current &&
compare_diff_patch current expected'
next prev parent reply other threads:[~2006-01-18 1:41 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 [this message]
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
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=7vvewi2typ.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.