Git development
 help / color / mirror / Atom feed
From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org, "D. Ben Knoble" <ben.knoble@gmail.com>
Subject: Re: [PATCH v4 2/2] format-patch: learn --[no-]range-diff-notes
Date: Sun, 04 Oct 2026 19:30:50 +0200	[thread overview]
Message-ID: <8df975c9-0f90-4ec5-8003-7f4757067fe2@app.fastmail.com> (raw)
In-Reply-To: <xmqqqzi5touh.fsf@gitster.g>

On Sun, Oct 4, 2026, at 18:25, Junio C Hamano wrote:
> kristofferhaugsbakk@fastmail.com writes:
>>[snip]
>> ***
>> Note that using `--creation-factor` without `--range-diff` will cause
>> the command to die. But this is not the case for `--[no-]range-diff-
>> notes`; we would have to check `rdiff_notes.override`, which is a sticky
>> value (cannot be turned off). The reason is that it is potentially
>> inconvenient to error out since it would not let you turn off
>> `--range-diff` in, say, some alias that uses `--no-range-diff-
>> notes`. Granted, it is difficult for me to come up with a concrete use
>> case since `--range-diff` requires a value, specifically a value which
>> is probably not that reusable (revision range), and yet you have
>> something like an alias set up with it. But why spend code closing
>> that door? There is no usability upside to erroring out.
>
> In short, do you mean something like this?
>
>   Unlike `--creation-factor`, `--[no-]range-diff-notes` does not
>   error out when used without `--range-diff`.  This flexibility
>   accommodates workflows where users might configure default options
>   in aliases or wrapper scripts, allowing `--range-diff` to be
>   toggled independently.

That’s a better way to describe it. I think I will use it pretty much
verbatim.

Now in hindsight, with your version on display in front of me, I don’t
know why I couldn’t make that paragraph more straighforward. Sometimes I
go on a narrative journey because I think it is clearer (but never
shorter), but here I didn’t want to do that at all. I just wanted to lay
out the motivation. Stumped.

>
> I suspect that erroring out when only creation-factor is given,
> perhaps via an alias, was a design mistake.  A user who wants to use
> a setting customized for their workflow must resort to an alias
> because there is no configuration variable to control its default.
> In that light, the same argument for --[no-]range-diff-notes applies
> here.  On the other hand, perhaps if we had a configuration variable
> to control which notes are compared in range-diff and shown in the
> output, we would not have to worry about these things.  I do not
> know.

Yeah it can prevent some workflows while not really helping prevent any
errors, I think.

I think I can make this next version right now. I have tried to give
more time to each version (like the last one, intentionally waiting more
than a day) in order to give other people time to react to them. However
at this point most of the changes in this series are so stable that I
don’t think there are any points to interject to for some hypotethetical
person that already had two days or so to speak up.

>[snip]

  reply	other threads:[~2026-10-04 17:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24 20:35 [PATCH 0/3] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 1/3] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 2/3] revision.h: rename struct member to reflect notes role kristofferhaugsbakk
2026-08-24 20:35 ` [PATCH 3/3] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-08-24 22:31   ` Junio C Hamano
2026-08-25 18:36     ` Kristoffer Haugsbakk
2026-08-28  0:31       ` Junio C Hamano
2026-08-28 13:48         ` Kristoffer Haugsbakk
2026-08-28 17:13           ` Junio C Hamano
2026-09-02 13:19             ` Kristoffer Haugsbakk
2026-09-06  7:22               ` Kristoffer Haugsbakk
2026-09-06 13:37                 ` D. Ben Knoble
2026-09-06 16:44                   ` Kristoffer Haugsbakk
2026-09-06 17:57                     ` D. Ben Knoble
2026-09-06 17:12                 ` Junio C Hamano
2026-09-09 18:08                   ` Kristoffer Haugsbakk
2026-09-09 19:04                     ` Junio C Hamano
2026-09-26 18:27 ` [PATCH v2 0/2] " kristofferhaugsbakk
2026-09-26 18:27   ` [PATCH v2 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-09-26 18:27   ` [PATCH v2 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-09-27 12:50     ` Junio C Hamano
2026-09-27 19:42       ` Kristoffer Haugsbakk
2026-09-28 15:35         ` Junio C Hamano
2026-09-28 15:53           ` Kristoffer Haugsbakk
2026-10-02 10:56 ` [PATCH v3 0/2] " kristofferhaugsbakk
2026-10-02 10:56   ` [PATCH v3 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-02 16:50     ` Junio C Hamano
2026-10-02 18:51       ` Kristoffer Haugsbakk
2026-10-02 19:07       ` Kristoffer Haugsbakk
2026-10-02 19:13         ` Kristoffer Haugsbakk
2026-10-02 10:56   ` [PATCH v3 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-10-02 17:28     ` Junio C Hamano
2026-10-02 18:56       ` Kristoffer Haugsbakk
2026-10-04 10:17 ` [PATCH v4 0/2] " kristofferhaugsbakk
2026-10-04 10:17   ` [PATCH v4 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-04 10:17   ` [PATCH v4 2/2] format-patch: learn --[no-]range-diff-notes kristofferhaugsbakk
2026-10-04 16:25     ` Junio C Hamano
2026-10-04 17:30       ` Kristoffer Haugsbakk [this message]
2026-10-04 17:58 ` [PATCH v5 0/2] " kristofferhaugsbakk
2026-10-04 17:58   ` [PATCH v5 1/2] format-patch: simplify get_notes_arg parameters kristofferhaugsbakk
2026-10-04 17:58   ` [PATCH v5 2/2] format-patch: learn --[no-]range-diff-notes 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=8df975c9-0f90-4ec5-8003-7f4757067fe2@app.fastmail.com \
    --to=kristofferhaugsbakk@fastmail.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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