From: Jeff King Date: Fri, 24 Oct 2025 17:05:22 GMT Subject: [PATCH 0/4] diff dry-run cleanups Message-ID: <20251024170522.GA2344972@coredump.intra.peff.net> Since we were talking about this topic so much this week, I wanted to collect these patches before they fell out of my head. They would go on top of ly/diff-name-only-with-diff-from-content. [1/4]: diff: send external diff output to diff_options.file This one is actually a bug-fix that we found along the way, and could be applied completely independently. AFAICT the bug has been there since 2008, though, so probably not super urgent. ;) [2/4]: diff: drop save/restore of color_moved in dry-run mode This one is hopefully a no-brainer simplification. [3/4]: diff: replace diff_options.dry_run flag with NULL file [4/4]: diff: drop dry-run redirection to /dev/null And then these ones clean up our extra layer of fixes, converting any missed dry_run checks into segfaults. But we hope there aren't any after Lidong's fixes. :) So possibly controversial, but I think the end result is nicer to read. diff.c | 56 +++++++++++----------------------------- diff.h | 2 -- t/t4020-diff-external.sh | 10 +++++++ 3 files changed, 25 insertions(+), 43 deletions(-) -Peff