From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Lidong Yan <yldhome2d2@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 0/4] diff dry-run cleanups
Date: Fri, 24 Oct 2025 13:05:22 -0400 [thread overview]
Message-ID: <20251024170522.GA2344972@coredump.intra.peff.net> (raw)
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
next reply other threads:[~2025-10-24 17:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 17:05 Jeff King [this message]
2025-10-24 17:06 ` [PATCH 1/4] diff: send external diff output to diff_options.file Jeff King
2025-10-24 17:07 ` [PATCH 2/4] diff: drop save/restore of color_moved in dry-run mode Jeff King
2025-10-24 17:08 ` [PATCH 3/4] diff: replace diff_options.dry_run flag with NULL file Jeff King
2025-10-24 17:22 ` Junio C Hamano
2025-10-24 17:09 ` [PATCH 4/4] diff: drop dry-run redirection to /dev/null Jeff King
2025-10-24 17:25 ` [PATCH 5/4] diff: simplify run_external_diff() quiet logic Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251024170522.GA2344972@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=yldhome2d2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).