From: Junio C Hamano Date: Tue, 23 Sep 2025 21:20:42 GMT Subject: Re: [PATCH 2/2] format-patch: handle range-diff on notes correctly for single patches Message-ID: In-Reply-To: <269dd1ed-e8b0-448a-a85f-fdcafafbd0a0@app.fastmail.com> "Kristoffer Haugsbakk" writes: > On Tue, Sep 23, 2025, at 00:01, Junio C Hamano wrote: >> kristofferhaugsbakk@fastmail.com writes: >> >>> From: Kristoffer Haugsbakk >>> >>> 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.