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

diff-files inconsistency with touched files

From
JSJames Spencer <jss43@cam.ac.uk>
Date
Sep 2, 2009, 17:27 UTC
Message-ID
<4A9EAAF3.3000002@cam.ac.uk>
Hi,
I am puzzled by the following behaviour:

$ git --version git version 1.6.4.2 $ git diff-files $ touch test $ git diff-files :100644 100644 9daeafb9864cf43055ae93beb0afd6c7d144bfa4 0000000000000000000000000000000000000000 M test $ git diff $ git diff-files $

I don't understand why git diff-files reports a file is changed when that file is touched nor why running git diff changes this to (what I think is) the correct behaviour.

Thanks in advance,
    --James
Next: Jeff King
Message 1 of 3 in “diff-files inconsistency with touched files”
  1. James SpencerSep 2, 2009
  2. Jeff KingSep 2, 2009
  3. James SpencerSep 3, 2009

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.