From: Thomas Rast <trast@student.ethz.ch>
To: Jeff King <peff@peff.net>
Cc: <git@vger.kernel.org>, Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Subject: Re: [RFH] Spurious failures of t0025.[34]
Date: Sat, 31 Jul 2010 00:47:45 +0200 [thread overview]
Message-ID: <201007310047.46206.trast@student.ethz.ch> (raw)
In-Reply-To: <20100730182532.GB18544@coredump.intra.peff.net>
Jeff King wrote:
> which dumped me with a shell in the "broken" state. The interesting
> thing is that I can then repeatably run "git diff two" and get an empty
> diff. So I don't think the error or race condition is in the run of
> "git diff" itself, but rather what happened above (presumably the in
> the read-tree step).
This, and Jonathan's observation about git-apply, finally got me
somewhere. The issue is that the index file has a timestamp different
from the saved mtimes of the file itself. This can be provoked
deterministically by the patch below, even without valgrind; valgrind
merely makes it much more likely to happen by slowing down
git-read-tree.
Now I don't know what the next step in the chain is. Who's the
resident expert on index raciness? Does git-diff then reindex the
file, and in doing so, change the index entry?
diff --git i/t/t0025-crlf-auto.sh w/t/t0025-crlf-auto.sh
index f5f67a6..7a9cd3a 100755
--- i/t/t0025-crlf-auto.sh
+++ w/t/t0025-crlf-auto.sh
@@ -46,6 +46,8 @@ test_expect_success 'crlf=true causes a CRLF file to be normalized' '
echo "two crlf" > .gitattributes &&
git read-tree --reset -u HEAD &&
+ test-chmtime +1 .git/index &&
+
# Note, "normalized" means that git will normalize it if added
has_cr two &&
twodiff=`git diff two` &&
@@ -58,6 +60,8 @@ test_expect_success 'text=true causes a CRLF file to be normalized' '
echo "two text" > .gitattributes &&
git read-tree --reset -u HEAD &&
+ test-chmtime +1 .git/index &&
+
# Note, "normalized" means that git will normalize it if added
has_cr two &&
twodiff=`git diff two` &&
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2010-07-30 22:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 21:40 [RFH] Spurious failures of t0025.[34] Thomas Rast
2010-07-30 18:25 ` Jeff King
2010-07-30 22:47 ` Thomas Rast [this message]
2010-08-05 22:01 ` Thomas Rast
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=201007310047.46206.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=eyvind.bernhardsen@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).