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

Re: [PATCH] Support diff.autorefreshindex=true in `git-diff --quiet'

From
KCKarl Chen <quarl@cs.berkeley.edu>
Date
Sep 1, 2008, 10:50 UTC
Message-ID
<quack.20080901T0350.lthzlmsgmx6@roar.cs.berkeley.edu>
In-Reply-To
<7vskskw41j.fsf@gitster.siamese.dyndns.org>
>>>>> On 2008-09-01 03:31 PDT, Junio C Hamano writes:
    Junio> Karl Chen <quarl@cs.berkeley.edu> writes:
    >> When diff.autorefreshindex is true, if a file has merely
    >> been 'touched' (mtime changed, but contents unchanged),
    >> then `git-diff --quiet' will now return 0 (indicating no
    >> change) instead of 1, and also silently refresh the index.
    Junio> My knee-jerk reaction is that I do not particularly
    Junio> like this, but I haven't thought things through.  What
    Junio> does --exit-code do with or without the configuration
    Junio> variable?

git diff --exit-code silently refreshes the index and returns 0, as documented and as I expect. So I further expect "git diff --exit-code --quiet" to be have the same semantics as "git diff --exit-code >/dev/null".

What don't you like about this? Isn't this the point of diff.autorefreshindex ?

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 8 in “Support diff.autorefreshindex=true in `git-diff --quiet'”
  1. Support diff.autorefreshindex=true in `git-diff --quiet'Karl Chen, Sep 1, 2008
  2. Junio C HamanoSep 1, 2008
  3. Karl ChenSep 1, 2008
  4. Re* [PATCH] Support diff.autorefreshindex=true in `git-diff --quiet'Junio C Hamano, Sep 2, 2008
  5. Karl ChenSep 2, 2008
  6. Junio C HamanoSep 2, 2008
  7. Karl ChenSep 2, 2008
  8. Junio C HamanoSep 2, 2008

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.