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

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

From
SBStephen Bannasch <stephen.bannasch@deanbrook.org>
Date
Jan 14, 2010, 05:57 UTC
Message-ID
<p06240813c77462aa2cfb@[63.138.152.134]>
In-Reply-To
<20100114052658.GA13973@coredump.intra.peff.net>
At 12:26 AM -0500 1/14/10, Jeff King wrote:
Show 18 quoted lines
>On Thu, Jan 14, 2010 at 12:01:46AM -0500, Stephen Bannasch wrote:
>
>> Do you know if there is a plumbing command that will stat all of the
>> files without listing the files that actually do need updating?
>>
>> In the case where file1 has been only touched but file2 has been
>> changed (and both are tracked) I'd like to stat both filesand then run
>> diff-files as plumbing to see that only file2 has been changed in the
>> working directory.
>
>Judging from the scripts in git itself, I think the recommended practice
>is to simply "git update-index --refresh -q >/dev/null".
>
>> 'git diff' also stats the files but strangely 'git diff --quiet' doesn't ???
>
>I can't reproduce that behavior here on the current "master". Old
>versions of git used to not do the index refresh for "diff". What
>version of git are you using?
The most recent test was on:

$ git --version git version 1.6.6

Previous: Jeff KingNext: Jeff King
Message 5 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.