Re: false positives from git diff-index when used with --git-dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 14, 2010 at 21:02, Jeff King <peff@xxxxxxxx> wrote:
> 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.

No, I'm not able to reproduce it this way. (Perhaps some more complex
operations on git tree are required -- looks like it happens only if
tree was changed.)

> You could also try running under valgrind to see if there are any bad
> memory accesses, which could also produce intermittent buggy behavior.

Thanks, I'll try it.

It feels like a race condition somewhere. (Quite possibly even in my
automation tool -- since I'm not able to reproduce bug outside of it
-- if so, sorry for the noise.)

I'll try some more debugging and will get back to you if I will have
any new information.

Thank you,
Alexander.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]