git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 23, 2025, 21:20 UTC
Message-ID
<xmqqplbgoogl.fsf@gitster.g>
In-Reply-To
<269dd1ed-e8b0-448a-a85f-fdcafafbd0a0@app.fastmail.com>
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
Show 18 quoted lines
> On Tue, Sep 23, 2025, at 00:01, Junio C Hamano wrote:
>> 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)).
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 [] ;-)

Show 9 quoted lines
>     `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.
Previous: Kristoffer HaugsbakkNext: kristofferhaugsbakk@fastmail.com
Message 11 of 15 in “format-patch: handle range-diff on notes correctly for single patches”
  1. 0/2 format-patch: handle range-diff on notes correctly for single patcheskristofferhaugsbakk@fastmail.com, Sep 22, 2025
  2. 1/2 revision: add rdiff_other_arg to rev_infokristofferhaugsbakk@fastmail.com, Sep 22, 2025
  3. Junio C HamanoSep 22, 2025
  4. Kristoffer HaugsbakkSep 23, 2025
  5. Junio C HamanoSep 23, 2025
  6. Kristoffer HaugsbakkSep 23, 2025
  7. Junio C HamanoSep 23, 2025
  8. 2/2 format-patch: handle range-diff on notes correctly for single patcheskristofferhaugsbakk@fastmail.com, Sep 22, 2025
  9. Junio C HamanoSep 22, 2025
  10. Kristoffer HaugsbakkSep 23, 2025
  11. Junio C HamanoSep 23, 2025
  12. 0/3 format-patch: handle range-diff on notes correctly for single patcheskristofferhaugsbakk@fastmail.com, Sep 25, 2025
  13. 1/3 range-diff: rename other_arg to log_argkristofferhaugsbakk@fastmail.com, Sep 25, 2025
  14. 2/3 revision: add rdiff_log_arg to rev_infokristofferhaugsbakk@fastmail.com, Sep 25, 2025
  15. 3/3 format-patch: handle range-diff on notes correctly for single patcheskristofferhaugsbakk@fastmail.com, Sep 25, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.