Re: [PATCH 2/2] format-patch: handle range-diff on notes correctly for single patches
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Sep 23, 2025, 16:26 UTC
- Message-ID
- <269dd1ed-e8b0-448a-a85f-fdcafafbd0a0@app.fastmail.com>
- In-Reply-To
- <xmqqecryrvt6.fsf@gitster.g>
On Tue, Sep 23, 2025, at 00:01, Junio C Hamano wrote:
Show 11 quoted lines
> kristofferhaugsbakk@fastmail.com writes: > >> From: Kristoffer Haugsbakk <code@khaugsbakk.name> >> >> 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)).
> If so, perhaps we should say not just "can get different Git notes" > but "can get notes even when you asked not to"?
I think “can get different Git notes” covers all possibilities, both too many and too few.
But like the previous commit this one could maybe use a rewrite.
No `--[no-]--notes` options are sent to the range-diff subprocess in
`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.
>> @@ -718,7 +718,8 @@ static void show_diff_of_diff(struct rev_info *opt) >> [snip]