Re: [RFC PATCH 1/3] range-diff: treat notes like `log`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 30, 2023 at 12:41:29PM +0200, Kristoffer Haugsbakk wrote:

> Currently, `range-diff` shows the default notes if no notes-related
> arguments are given. This is also how `log` behaves. But unlike
> `range-diff`, `log` does *not* show the default notes if
> `--notes=<custom>` are given. In other words, this:
> 
>     git log --notes=custom
> 
> is equivalent to this:
> 
>     git log --no-notes --notes=custom
> 
> While:
> 
>     git range-diff --notes=custom
> 
> acts like this:
> 
>     git log --notes --notes-custom
> 
> This can’t be how the user expects `range-diff` to behave given that the
> man page for `range diff` under `--[no-]notes[=<ref>]` says:
> 
> > This flag is passed to the git log program (see git-log(1)) that
> > generates the patches.

Yeah, I certainly agree that the behavior of range-diff is surprising,
and that this is a bug.

I'd have expected the solution here would be for range-diff to stop
passing "--notes", and let "log" decide whether to show notes (based on
specific --notes=foo it gets from other_arg).

But...

> This behavior also affects `format-patch` since it uses `range-diff` for
> the cover letter. Unlike `log`, though, `format-patch` is not supposed
> to show the default notes if no notes-related arguments are given.[1]
> But this promise is broken when the range-diff happens to have something
> to say about the changes to the default notes, since that will be shown
> in the cover letter.
> 
> Remedy this by co-opting the `--standard-notes` option which has been
> deprecated since ab18b2c0df[2] and which is currently only documented in
> `pretty-options`.

I'm not clear on whether you're actually fixing two separate bugs here,
or if they need to be intertwined.

It seems like passing --standard-notes means that format-patch's
range-diff will still show the standard notes by default. Maybe I'm
misunderstanding the problem, though.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux