git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:56 UTC

Re: [PATCH v4 2/2] format-patch: learn --[no-]range-diff-notes

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Oct 4, 2026, 17:30 UTC
Message-ID
<8df975c9-0f90-4ec5-8003-7f4757067fe2@app.fastmail.com>
In-Reply-To
<xmqqqzi5touh.fsf@gitster.g>
On Sun, Oct 4, 2026, at 18:25, Junio C Hamano wrote:
Show 22 quoted lines
> 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.

Show 10 quoted lines
>
> 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]
Previous: Junio C HamanoNext: kristofferhaugsbakk@fastmail.com
Message 38 of 41 in “format-patch: learn --[no-]range-diff-notes”
  1. 0/3 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Aug 24, 2026
  2. 1/3 format-patch: simplify get_notes_arg parameterskristofferhaugsbakk@fastmail.com, Aug 24, 2026
  3. 2/3 revision.h: rename struct member to reflect notes rolekristofferhaugsbakk@fastmail.com, Aug 24, 2026
  4. 3/3 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Aug 24, 2026
  5. Junio C HamanoAug 24, 2026
  6. Kristoffer HaugsbakkAug 25, 2026
  7. Junio C HamanoAug 28, 2026
  8. Kristoffer HaugsbakkAug 28, 2026
  9. Junio C HamanoAug 28, 2026
  10. Kristoffer HaugsbakkSep 2, 2026
  11. Kristoffer HaugsbakkSep 6, 2026
  12. D. Ben KnobleSep 6, 2026
  13. Kristoffer HaugsbakkSep 6, 2026
  14. Junio C HamanoSep 6, 2026
  15. D. Ben KnobleSep 6, 2026
  16. Kristoffer HaugsbakkSep 9, 2026
  17. Junio C HamanoSep 9, 2026
  18. 0/2 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Sep 26, 2026
  19. 1/2 format-patch: simplify get_notes_arg parameterskristofferhaugsbakk@fastmail.com, Sep 26, 2026
  20. 2/2 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Sep 26, 2026
  21. Junio C HamanoSep 27, 2026
  22. Kristoffer HaugsbakkSep 27, 2026
  23. Junio C HamanoSep 28, 2026
  24. Kristoffer HaugsbakkSep 28, 2026
  25. 0/2 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Oct 2, 2026
  26. 1/2 format-patch: simplify get_notes_arg parameterskristofferhaugsbakk@fastmail.com, Oct 2, 2026
  27. 2/2 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Oct 2, 2026
  28. Junio C HamanoOct 2, 2026
  29. Junio C HamanoOct 2, 2026
  30. Kristoffer HaugsbakkOct 2, 2026
  31. Kristoffer HaugsbakkOct 2, 2026
  32. Kristoffer HaugsbakkOct 2, 2026
  33. Kristoffer HaugsbakkOct 2, 2026
  34. 0/2 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Oct 4, 2026
  35. 1/2 format-patch: simplify get_notes_arg parameterskristofferhaugsbakk@fastmail.com, Oct 4, 2026
  36. 2/2 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Oct 4, 2026
  37. Junio C HamanoOct 4, 2026
  38. Kristoffer HaugsbakkOct 4, 2026
  39. 0/2 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Oct 4, 2026
  40. 1/2 format-patch: simplify get_notes_arg parameterskristofferhaugsbakk@fastmail.com, Oct 4, 2026
  41. 2/2 format-patch: learn --[no-]range-diff-noteskristofferhaugsbakk@fastmail.com, Oct 4, 2026

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.