{"thread":{"id":"25447","subject":"false positives from git diff-index when used with --git-dir","startedAt":"2010-10-14T14:40:51Z","lastAt":"2010-10-14T17:20:23Z","messageCount":3,"participants":["Alexander Gladysh","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"153516","messageId":"AANLkTimyeE=OLdC0Zzdnidr_dssFfkMzS+r_39dYUVxz@mail.gmail.com","threadId":"25447","inReplyTo":null,"subject":"false positives from git diff-index when used with --git-dir","fromName":"Alexander Gladysh","fromEmail":"agladysh@gmail.com","sentAt":"2010-10-14T14:40:51Z","receivedAt":"2010-10-14T14:40:51Z","isPatch":false,"sender":{"key":"agladysh@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38239?v=4"},"body":"Hi, list!\n\n$ git --version\ngit version 1.7.3.1\n\n$ lsb_release -a\nNo LSB modules are available.\nDistributor ID:\tUbuntu\nDescription:\tUbuntu 10.10\nRelease:\t10.10\nCodename:\tmaverick\n\nI'm *sometimes* (once in about ten times I use it -- repository\nchanges between invocations of course) getting false positives from\ngit diff-index when I invoke git from another directory:\n\ngit --git-dir=path/to/.git --work-tree=path/to update-index -q --refresh\ngit --git-dir=path/to/.git --work-tree=path/to diff-index --exit-code\n--quiet HEAD\n\nThis is *really* annoying and really kills the benifits from my\nworkflow automation scripts.\n\nUnfortunately I can't find a reproducible use case for this bug.\n\nIs there anything I can do to help catch it?\n\nThanks,\nAlexander.\n"},{"id":"153522","messageId":"20101014170227.GA14429@sigill.intra.peff.net","threadId":"25447","inReplyTo":"AANLkTimyeE=OLdC0Zzdnidr_dssFfkMzS+r_39dYUVxz@mail.gmail.com","subject":"Re: false positives from git diff-index when used with --git-dir","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-10-14T17:02:28Z","receivedAt":"2010-10-14T17:02:28Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Oct 14, 2010 at 06:40:51PM +0400, Alexander Gladysh wrote:\n\n> I'm *sometimes* (once in about ten times I use it -- repository\n> changes between invocations of course) getting false positives from\n> git diff-index when I invoke git from another directory:\n> \n> git --git-dir=path/to/.git --work-tree=path/to update-index -q --refresh\n> git --git-dir=path/to/.git --work-tree=path/to diff-index --exit-code\n> --quiet HEAD\n> \n> This is *really* annoying and really kills the benifits from my\n> workflow automation scripts.\n> \n> Unfortunately I can't find a reproducible use case for this bug.\n> \n> Is there anything I can do to help catch it?\n\nCan it reproduce over a large number of trials? I.e., something like:\n\n  while true; do\n    git ... update-index ...\n    git ... diff-index ... || echo failed\n  done\n\nIf so, try adding a \"sleep 1\" between the two commands. If that fixes\nit, it implies a race condition in git.\n\nYou could also try running under valgrind to see if there are any bad\nmemory accesses, which could also produce intermittent buggy behavior.\n\n-Peff\n"},{"id":"153524","messageId":"AANLkTimqvmecpt_j=HqHF1tircO5bPJHtRW-ePQ-wE+T@mail.gmail.com","threadId":"25447","inReplyTo":"20101014170227.GA14429@sigill.intra.peff.net","subject":"Re: false positives from git diff-index when used with --git-dir","fromName":"Alexander Gladysh","fromEmail":"agladysh@gmail.com","sentAt":"2010-10-14T17:20:23Z","receivedAt":"2010-10-14T17:20:23Z","isPatch":false,"sender":{"key":"agladysh@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38239?v=4"},"body":"On Thu, Oct 14, 2010 at 21:02, Jeff King <peff@peff.net> wrote:\n> On Thu, Oct 14, 2010 at 06:40:51PM +0400, Alexander Gladysh wrote:\n\n>> I'm *sometimes* (once in about ten times I use it -- repository\n>> changes between invocations of course) getting false positives from\n>> git diff-index when I invoke git from another directory:\n\n>> git --git-dir=path/to/.git --work-tree=path/to update-index -q --refresh\n>> git --git-dir=path/to/.git --work-tree=path/to diff-index --exit-code\n>> --quiet HEAD\n\n>> This is *really* annoying and really kills the benifits from my\n>> workflow automation scripts.\n\n>> Unfortunately I can't find a reproducible use case for this bug.\n\n>> Is there anything I can do to help catch it?\n\n> Can it reproduce over a large number of trials? I.e., something like:\n\n>  while true; do\n>    git ... update-index ...\n>    git ... diff-index ... || echo failed\n>  done\n\n> If so, try adding a \"sleep 1\" between the two commands. If that fixes\n> it, it implies a race condition in git.\n\nNo, I'm not able to reproduce it this way. (Perhaps some more complex\noperations on git tree are required -- looks like it happens only if\ntree was changed.)\n\n> You could also try running under valgrind to see if there are any bad\n> memory accesses, which could also produce intermittent buggy behavior.\n\nThanks, I'll try it.\n\nIt feels like a race condition somewhere. (Quite possibly even in my\nautomation tool -- since I'm not able to reproduce bug outside of it\n-- if so, sorry for the noise.)\n\nI'll try some more debugging and will get back to you if I will have\nany new information.\n\nThank you,\nAlexander.\n"}]}