git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] format-patch: handle range-diff on notes correctly for single patches
Date: Tue, 23 Sep 2025 14:20:42 -0700	[thread overview]
Message-ID: <xmqqplbgoogl.fsf@gitster.g> (raw)
In-Reply-To: <269dd1ed-e8b0-448a-a85f-fdcafafbd0a0@app.fastmail.com> (Kristoffer Haugsbakk's message of "Tue, 23 Sep 2025 18:26:33 +0200")

"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:

> 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 [] ;-)

>     `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.

  reply	other threads:[~2025-09-23 21:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 21:10 [PATCH 0/2] format-patch: handle range-diff on notes correctly for single patches kristofferhaugsbakk
2025-09-22 21:10 ` [PATCH 1/2] revision: add rdiff_other_arg to rev_info kristofferhaugsbakk
2025-09-22 21:58   ` Junio C Hamano
2025-09-23 15:53     ` Kristoffer Haugsbakk
2025-09-23 17:35       ` Junio C Hamano
2025-09-23 17:47         ` Kristoffer Haugsbakk
2025-09-23 21:18           ` Junio C Hamano
2025-09-22 21:10 ` [PATCH 2/2] format-patch: handle range-diff on notes correctly for single patches kristofferhaugsbakk
2025-09-22 22:01   ` Junio C Hamano
2025-09-23 16:26     ` Kristoffer Haugsbakk
2025-09-23 21:20       ` Junio C Hamano [this message]
2025-09-25 17:07 ` [PATCH v2 0/3] " kristofferhaugsbakk
2025-09-25 17:07   ` [PATCH v2 1/3] range-diff: rename other_arg to log_arg kristofferhaugsbakk
2025-09-25 17:07   ` [PATCH v2 2/3] revision: add rdiff_log_arg to rev_info kristofferhaugsbakk
2025-09-25 17:07   ` [PATCH v2 3/3] format-patch: handle range-diff on notes correctly for single patches kristofferhaugsbakk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqplbgoogl.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kristofferhaugsbakk@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).