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

touching a file causes it to be listed using git diff-files

From
SBStephen Bannasch <stephen.bannasch@deanbrook.org>
Date
Jan 13, 2010, 23:57 UTC
Message-ID
<p0624080ec7740ddc4caf@[63.138.152.134]>
If I touch a file in the working directory (only changing it's last-modified) attribute it shows up when running git diff-files.
If I then run git status followed by git diff-files again it doesn't show up either time.
Is this an error?
Simple example:

[dev]$ git --version git version 1.6.5.3

[dev]$ git init t Initialized empty shared Git repository in /Users/stephen/dev/t/.git/

[dev]$ cd t
[t (master)]$ echo 'hi' > hello; git add hello; git commit -am 'initial commit'
[master (root-commit) f39d21a] initial commit
  1 files changed, 1 insertions(+), 0 deletions(-)
  create mode 100644 hello
[t (master)]$ git diff-files

[t (master)]$ git status # On branch master nothing to commit (working directory clean)

[t (master)]$ touch hello

[t (master)]$ git diff-files :100644 100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 0000000000000000000000000000000000000000 M hello

[t (master)]$ git status # On branch master nothing to commit (working directory clean)

[t (master)]$ git diff-files
Next: Jeff King
Message 1 of 6 in “touching a file causes it to be listed using git diff-files”
  1. Stephen BannaschJan 13, 2010
  2. Jeff KingJan 14, 2010
  3. Stephen BannaschJan 14, 2010
  4. Jeff KingJan 14, 2010
  5. Stephen BannaschJan 14, 2010
  6. Jeff KingJan 14, 2010

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.