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

From: Junio C Hamano <[email-masked]>
Date: Tue, 23 Sep 2025 14:20:42 -0700

"Kristoffer Haugsbakk" <[email-masked]> writes:

> On Tue, Sep 23, 2025, at 00:01, Junio C Hamano wrote:
>> [email-masked] writes:
>>
>>> From: Kristoffer Haugsbakk <[email-masked]>
>>>
>>> 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.