From: kristofferhaugsbakk@fastmail.com
To: git@vger.kernel.org
Cc: Kristoffer Haugsbakk <code@khaugsbakk.name>,
"D . Ben Knoble" <ben.knoble@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v3 0/2] format-patch: learn --[no-]range-diff-notes
Date: Fri, 2 Oct 2026 12:56:37 +0200 [thread overview]
Message-ID: <V3_CV_format-patch_learn_--range-diff-notes.d39@m5gid.xyz> (raw)
In-Reply-To: <CV_format-patch_learn_--range-diff-notes.c57@msgid.xyz>
From: Kristoffer Haugsbakk <code@khaugsbakk.name>
Topic name (applied): kh/format-patch-range-diff-notes
Topic summary: Teach 'format-patch' options to tweak notes output in the
range diff independent of what notes are output in the patches.
See patch 2/2 for details.
This is motivated by wanting to turn off range diff notes, but the goal
here is to implement it in full generality.
(How many of us `git format-patch --notes` users are there out there? More
than a dozen? Maybe just D. Ben Knoble and me?)
I have implemented this behavior for myself and used it for many
months. But that was hacky and only suitable for one person’s use.
So this is a completely new implementation. In other words: this is
new code, *not* tested for months.
§ Changes in v3
From patch 2/2:
Remove repeated and redundant `test_when_finished` on
patch files:
https://lore.kernel.org/git/CV_format-patch_learn_--range-diff-notes.c57@msgid.xyz/T/#m06803e233a2e385e694432d45ecf402f7a67e482
§ Link to v2
https://lore.kernel.org/git/V2_CV_format-patch_learn_--range-diff-notes.cdb@m5gid.xyz/
[1/2] format-patch: simplify get_notes_arg parameters
[2/2] format-patch: learn --[no-]range-diff-notes
Documentation/git-format-patch.adoc | 15 +++++
builtin/log.c | 62 +++++++++++++++++++--
t/t3206-range-diff.sh | 86 +++++++++++++++++++++++++++++
3 files changed, 157 insertions(+), 6 deletions(-)
Interdiff against v2:
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index 640c5dec52e..679a707c873 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -860,7 +860,6 @@ test_expect_success 'format-patch --range-diff-notes=not-a-note (no --range-diff
test_when_finished "rm -f 000?-*" &&
git format-patch --range-diff-notes=not-a-note --cover-letter \
main..unmodified &&
- test_when_finished "rm -f 000?-*" &&
test_file_not_empty 0000-cover-letter* &&
test_grep ! "^Range-diff:" 0000-cover-letter* &&
test_grep ! "## Notes " 0000-cover-letter*
Range-diff against v2:
1: 977f9c2e97a = 1: 977f9c2e97a format-patch: simplify get_notes_arg parameters
2: bf66e94e376 ! 2: 748759ca021 format-patch: learn --[no-]range-diff-notes
@@ Commit message
## Notes (testing) ##
- CI: https://github.com/LemmingAvalanche/git/actions/runs/36231842902
-
- This run is on a previous iteration where v1 patch/commit 2/3 was still
- there. But that is just a rename. So I compiled and tested
- `t/t3206-range-diff.sh` and took that as proof that the full CI/build run
- is still valid.
+ For v3: only compiled and ran `t3206-range-diff`.
## Documentation/git-format-patch.adoc ##
@@ Documentation/git-format-patch.adoc: case is to show comparison with an older iteration of the same
@@ t/t3206-range-diff.sh: test_expect_success 'format-patch --range-diff with multi
+ test_when_finished "rm -f 000?-*" &&
+ git format-patch --range-diff-notes=not-a-note --cover-letter \
+ main..unmodified &&
-+ test_when_finished "rm -f 000?-*" &&
+ test_file_not_empty 0000-cover-letter* &&
+ test_grep ! "^Range-diff:" 0000-cover-letter* &&
+ test_grep ! "## Notes " 0000-cover-letter*
base-commit: 1a3e64c6c4a623626ff0687008732a8e007e2a1c
--
2.55.0.793.gc667de3f2c5
next prev parent reply other threads:[~2026-10-02 10:57 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 20:35 [PATCH 0/3] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 1/3] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 2/3] revision.h: rename struct member to reflect notes role kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 3/3] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-08-24 22:31 ` Junio C Hamano
2026-08-25 18:36 ` Kristoffer Haugsbakk
2026-08-28 0:31 ` Junio C Hamano
2026-08-28 13:48 ` Kristoffer Haugsbakk
2026-08-28 17:13 ` Junio C Hamano
2026-09-02 13:19 ` Kristoffer Haugsbakk
2026-09-06 7:22 ` Kristoffer Haugsbakk
2026-09-06 13:37 ` D. Ben Knoble
2026-09-06 16:44 ` Kristoffer Haugsbakk
2026-09-06 17:57 ` D. Ben Knoble
2026-09-06 17:12 ` Junio C Hamano
2026-09-09 18:08 ` Kristoffer Haugsbakk
2026-09-09 19:04 ` Junio C Hamano
2026-09-26 18:27 ` [PATCH v2 0/2] " kristofferhaugsbakk
2026-09-26 18:27 ` [PATCH v2 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-09-26 18:27 ` [PATCH v2 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-09-27 12:50 ` Junio C Hamano
2026-09-27 19:42 ` Kristoffer Haugsbakk
2026-09-28 15:35 ` Junio C Hamano
2026-09-28 15:53 ` Kristoffer Haugsbakk
2026-10-02 10:56 ` kristofferhaugsbakk [this message]
2026-10-02 10:56 ` [PATCH v3 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-02 16:50 ` Junio C Hamano
2026-10-02 18:51 ` Kristoffer Haugsbakk
2026-10-02 19:07 ` Kristoffer Haugsbakk
2026-10-02 19:13 ` Kristoffer Haugsbakk
2026-10-02 10:56 ` [PATCH v3 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-10-02 17:28 ` Junio C Hamano
2026-10-02 18:56 ` Kristoffer Haugsbakk
2026-10-04 10:17 ` [PATCH v4 0/2] " kristofferhaugsbakk
2026-10-04 10:17 ` [PATCH v4 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-04 10:17 ` [PATCH v4 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-10-04 16:25 ` Junio C Hamano
2026-10-04 17:30 ` Kristoffer Haugsbakk
2026-10-04 17:58 ` [PATCH v5 0/2] " kristofferhaugsbakk
2026-10-04 17:58 ` [PATCH v5 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-04 17:58 ` [PATCH v5 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=V3_CV_format-patch_learn_--range-diff-notes.d39@m5gid.xyz \
--to=kristofferhaugsbakk@fastmail.com \
--cc=ben.knoble@gmail.com \
--cc=code@khaugsbakk.name \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.