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

Re: False positives in git diff-index

From
Alexander Gladysh <agladysh@gmail.com>
Date
Jan 5, 2011, 07:46 UTC
Message-ID
<AANLkTimFbodDe=DMj5kkR749sG8bDTxyjDCtOEvmDkRd@mail.gmail.com>
In-Reply-To
<20110105061515.GA12163@sigill.intra.peff.net>
On Wed, Jan 5, 2011 at 06:15, Jeff King <peff@peff.net> wrote:
> On Wed, Jan 05, 2011 at 06:07:35AM +0000, Alexander Gladysh wrote:
>> > 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?

----> Rebuilding manifest... Making manifest for . Generating index.html for . :100644 100644 483a7292436daecc9bea0ab265ee19d587b14298 0000000000000000000000000000000000000000 M cluster/localhost-ag/rocks/index.html :100644 100644 fcb9ff896fd1a1bd15663fa9be19b250789d4a25 0000000000000000000000000000000000000000 M cluster/localhost-ag/rocks/manifest

These are the two files, which are overridden with identical content. (See below, looks like I realized who to blame.)

If I read this correctly, Git tells me that the files are deleted. No?

Anyway, I checked, looks like that files are overridden (by fopen("name", "w")), never explicitly deleted. If it is important, I will checkout strace.

Contunuing with the script:

----> Comitting changed manifest... 2edcbfabc11f9bbab4fc8c059490cba9ae196d27 # On branch ag/git-debugging # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # typechange: cluster/localhost-ag/versions/versions-current.lua # no changes added to commit (use "git add" and/or "git commit -a")

Suddenly: no changes.
> 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).
Git status before:

$ git status # On branch ag/git-debugging # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # typechange: cluster/localhost-ag/versions/versions-current.lua # no changes added to commit (use "git add" and/or "git commit -a")

> 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?
No other process. But see below.
> 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).
And here I have to say "Oops".

My apologies, I should have realized this before: my project is mounted on VMWare's HGFS.

(That is: VMWare Fusion Ubuntu Guest -> HGFS -> OS X 10.6 Host files.)

The problem is not reproduced if I copy the project to the native fs in the guest machine.

But the problem is also not reproduced if I execute your script on the HGFS.
So, does that mean that HGFS violates consistency guarantees?
Alexander.
Previous: Jeff KingNext: Jeff King
Message 10 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.