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

Re: diff --cached --no-ext-diff --find-copies-harder --quiet exits with wrong status code

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Nov 8, 2025, 19:12 UTC
Message-ID
<CALnO6CA187833M7SFDTrbSaTOpo5vSt3UGUFEiLGpiJnk_ekmg@mail.gmail.com>
In-Reply-To
<CALnO6CBsXEpeCTS=FpcOvXEOw7sNGT8fdb4Z8PBewoW0iRMnXQ@mail.gmail.com>
On Sat, Nov 8, 2025 at 2:08 PM D. Ben Knoble <ben.knoble@gmail.com> wrote:
Show 11 quoted lines
>
> On Sat, Nov 8, 2025 at 2:05 PM D. Ben Knoble <ben.knoble@gmail.com> wrote:
> >
> > AFAICT, you need all of the mentioned options to trigger the bug.
> > Allowing ext-diff works fine, I don't think it's triggered in
> > non-cached diffs, and I've never seen it without --find-copies-harder.
> > Notably, s/quiet/exit-code works just fine.
>
>
> I think I also spotted a difference in diff_from_contents, but not
> sure if that's relevant.
Yeesh. You know how writing for others clarifies thoughts? Well...

I just noticed that diff_setup_done tweaks diff_from_contents based on whether external diffs are allowed. Possibly relevant? I haven't been able to easily identify a place where all 3 relevant options come together, but this would be 2 of them (quiet and ext-diff).

-- 
D. Ben Knoble
Previous: D. Ben KnobleNext: René Scharfe
Message 3 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.