From: Jeff King <peff@peff.net>
To: Alexander Gladysh <agladysh@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: false positives from git diff-index when used with --git-dir
Date: Thu, 14 Oct 2010 13:02:28 -0400 [thread overview]
Message-ID: <20101014170227.GA14429@sigill.intra.peff.net> (raw)
In-Reply-To: <AANLkTimyeE=OLdC0Zzdnidr_dssFfkMzS+r_39dYUVxz@mail.gmail.com>
On Thu, Oct 14, 2010 at 06:40:51PM +0400, Alexander Gladysh wrote:
> I'm *sometimes* (once in about ten times I use it -- repository
> changes between invocations of course) getting false positives from
> git diff-index when I invoke git from another directory:
>
> git --git-dir=path/to/.git --work-tree=path/to update-index -q --refresh
> git --git-dir=path/to/.git --work-tree=path/to diff-index --exit-code
> --quiet HEAD
>
> This is *really* annoying and really kills the benifits from my
> workflow automation scripts.
>
> Unfortunately I can't find a reproducible use case for this bug.
>
> Is there anything I can do to help catch it?
Can it reproduce over a large number of trials? I.e., something like:
while true; do
git ... update-index ...
git ... diff-index ... || echo failed
done
If so, try adding a "sleep 1" between the two commands. If that fixes
it, it implies a race condition in git.
You could also try running under valgrind to see if there are any bad
memory accesses, which could also produce intermittent buggy behavior.
-Peff
next prev parent reply other threads:[~2010-10-14 17:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-14 14:40 false positives from git diff-index when used with --git-dir Alexander Gladysh
2010-10-14 17:02 ` Jeff King [this message]
2010-10-14 17:20 ` Alexander Gladysh
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=20101014170227.GA14429@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=agladysh@gmail.com \
--cc=git@vger.kernel.org \
/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).