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

Re: [PATCH v2] diff: disable rename detection with --quiet

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 10, 2025, 19:13 UTC
Message-ID
<xmqqseelzong.fsf@gitster.g>
In-Reply-To
<20251110175408.GB76603@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> This makes sense to me, and I can't think of a reason why you would want
> rename detection on if we're not going to show the results (and likewise
> I can't think of a way that a rename result would affect has_changes).
>
> I wonder if we should _also_ take the hunk from v1 that teaches
> can_quit_early() to avoid triggering when copy detection is on. It's
> probably redundant now, but it feels to me like that's the place where
> the correctness check should kick in. And the patch here is just
> optimizing out the unnecessary work, but also happens to align things
> for correctness downstream.
Concurred on both counts.
Show 6 quoted lines
> You don't say in the commit message when this bug started. I briefly
> wondered if it was caused by the recent diff_from_contents stuff we've
> been discussing. But it's the opposite here (the bug happens when we
> _don't_ set diff_from_contents). And I think it goes all the way back to
> b4194828dc (diff-index --quiet: learn the "stop feeding the backend
> early" logic, 2011-05-31).

Yup, I think so. Back then I think our assumptions are that the user knows better than giving complex diffcore requests like find-copies-harder only to discard the results with --quiet, and the patch started this thread helps other users, which is good ;-).

Previous: Jeff KingNext: René Scharfe
Message 13 of 15 in “diff --cached --no-ext-diff --find-copies-harder --quiet exits with wrong status code”
  1. D. Ben KnobleNov 8, 2025
  2. D. Ben KnobleNov 8, 2025
  3. D. Ben KnobleNov 8, 2025
  4. diff: disabled quick optimization with --find-copies-harderRené Scharfe, Nov 9, 2025
  5. Phillip WoodNov 9, 2025
  6. René ScharfeNov 9, 2025
  7. diff: disable rename detection with --quietRené Scharfe, Nov 9, 2025
  8. D. Ben KnobleNov 9, 2025
  9. René ScharfeNov 9, 2025
  10. D. Ben KnobleNov 10, 2025
  11. Phillip WoodNov 10, 2025
  12. Jeff KingNov 10, 2025
  13. Junio C HamanoNov 10, 2025
  14. René ScharfeNov 22, 2025
  15. Junio C HamanoNov 23, 2025

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.