Thread (1 message) 1 message, 1 author, 2025-09-23

Re: [PATCH 2/2] format-patch: handle range-diff on notes correctly for single patches

From: Junio C Hamano <hidden>
Date: 2025-09-23 21:20:44

"Kristoffer Haugsbakk" [off-list ref] writes:
On Tue, Sep 23, 2025, at 00:01, Junio C Hamano wrote:
quoted
kristofferhaugsbakk@fastmail.com writes:
quoted
From: Kristoffer Haugsbakk <redacted>

No `--[no-]notes` options are sent to the range-diff subprocess in
`range-diff.c` when making a single patch.  This means that you can get
different Git notes below the commit message and in the range-diff
part.  (See the previous commit for elaboration.)
Would this also mean "range-diff --no-notes" would not have any
effect in squelching the note output in such a mode?
Do you mean `git format-patch ... --range-diff --no-notes`?  Yes,
`--no-notes` has no effect.  range-diff just does the default thing
which is `--show-notes-by-default` (act like git-log(1), which shows the
default notes namespace unless any `--[no-]notes` options are given (and
there are no such options in this case)).
And this change will fix that too, which is nice.
But like the previous commit this one could maybe use a rewrite.

    No `--[no-]--notes` options are sent to the range-diff subprocess in
"--notes" --> "notes", as a required single dash after negation is
already inside [] ;-)
    `range-diff.c` when making a single patch.  This means that range-diff
    will handle Git notes like git-log(1).

    This is a problem when you ask to use certain notes, or none at all,
    since that set of notes will appear beneath the commit message but the
    range-diff will have whatever notes that git-log(1) would have given
    you.

That’s at least less dense.
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help