git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: False positives in git diff-index

From
Jeff King <peff@peff.net>
Date
Jan 5, 2011, 06:15 UTC
Message-ID
<20110105061515.GA12163@sigill.intra.peff.net>
In-Reply-To
<AANLkTimQCMr+emw=rXdBKKnD_W9G981zCkboKgiDWxPF@mail.gmail.com>
On Wed, Jan 05, 2011 at 06:07:35AM +0000, Alexander Gladysh wrote:
Show 12 quoted lines
> > Basically, we generate random data which has a 20% chance of
> > being the same as what's there. When it is, we should get "not bothering
> > to commit", but in your error case, we would try to commit (and get "no
> > changes").
> 
> > But using that script, I can't replicate your problem. Can you try
> > running it on the same box you're having trouble with? That might at
> > least tell us if it's your environment or something more complex going
> > on.
> 
> Thank you. I tried it, and, unfortunately, it does not reproduce the
> problem.
Oh well, thanks for trying.

Going back to your original reproduction recipe, can you change the "diff-index" line to actually report on what it thinks is different? That is, drop the "--quiet" and have it actually produce a patch?

It would be interesting to see what is different, and how that compares with the "git status" you run just prior to it (and whether it matches the file you "git add"ed just above).

You haven't told us much about your build process. Are you absolutely sure that there couldn't be another process on the system manipulating the files between the various runs?

Are you running on top of any special filesystem that might not meet the consistency guarantees we expect (though in that case, I would assume my trivial script would have reproduced).

-Peff
Previous: Alexander GladyshNext: Alexander Gladysh
Message 9 of 12 in “False positives in git diff-index”
  1. Alexander GladyshDec 27, 2010
  2. Alexander GladyshJan 4, 2011
  3. Zenaan HarknessJan 4, 2011
  4. Alexander GladyshJan 4, 2011
  5. Jakub NarebskiJan 4, 2011
  6. Alexander GladyshJan 4, 2011
  7. Jeff KingJan 5, 2011
  8. Alexander GladyshJan 5, 2011
  9. Jeff KingJan 5, 2011
  10. Alexander GladyshJan 5, 2011
  11. Jeff KingJan 5, 2011
  12. Alexander GladyshJan 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.