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

Re: [PATCH v3] diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes

From
Jeff King <peff@peff.net>
Date
Jun 20, 2012, 18:52 UTC
Message-ID
<20120620185237.GA31520@sigill.intra.peff.net>
In-Reply-To
<7vpq8tvn5i.fsf@alter.siamese.dyndns.org>
On Wed, Jun 20, 2012 at 11:44:25AM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > Fine by me. I think "xdiff_found_changes" is not quite accurate; it is
> > really "did builtin_diff find any changes?" since we might never call
> > into xdiff (e.g., for binary files). I'm not sure what the best name is.
> 
> "diffopt.found_changes" is clear enough for me.

I thought this bug would be enough to show that diffopt.found_changes is not clear enough. It is the source of the original bug (the code should have been using HAS_CHANGES instead of found_changes), and it gave at least one of the bug investigators (i.e., me) quite a bit of confusion to understand why found_changes was not being set when diff_flush found changes.

IOW, as a naive reader of the "struct diff_options", how do I understand the difference between HAS_CHANGES and found_changes?

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 13 in “diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes”
  1. diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changesTim Henigan, Jun 18, 2012
  2. Jeff KingJun 18, 2012
  3. Junio C HamanoJun 18, 2012
  4. Tim HeniganJun 19, 2012
  5. Jeff KingJun 19, 2012
  6. Tim HeniganJun 19, 2012
  7. Tim HeniganJun 20, 2012
  8. Jeff KingJun 20, 2012
  9. Junio C HamanoJun 20, 2012
  10. Jeff KingJun 20, 2012
  11. Junio C HamanoJun 20, 2012
  12. Tim HeniganJun 21, 2012
  13. Junio C HamanoJun 21, 2012

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.