Re: [PATCH v2 1/1] advice: add --no-advice global option
- From
- Dragan Simic <dsimic@manjaro.org>
- Date
- Apr 29, 2024, 05:36 UTC
- Message-ID
- <809a1452fb18a6c03d9e8ed516d5c9c0@manjaro.org>
- In-Reply-To
- <D0WCCOLSMM9K.24BIGLR6EEJI8@jamesliu.io>
On 2024-04-29 07:01, James Liu wrote:
> Thanks for the feedback Dragan!
Thank you for working on the patch.
Show 15 quoted lines
>> After having a more detailed look at the Git documentation, >> I think that adding support for "--advice" at the same time >> would be the right thing to do. That option would override >> all "advice.<hint>" options that may exist in the configuration >> (and would override the GIT_NO_ADVICE environment variable, >> if we end up supporting it), similarly to how "--paginate" >> overrides all "pager.<cmd>" in the configuration, which would >> be both consistent and rather useful in some situations. > > I think this makes sense from a UX consistenty perspective, but I'm not > sure if we should increase the scope of this patch. It's also much > easier to re-enable previously silenced advice hints, so I'm unsure > whether an --advice option makes sense. We can also avoid the decision > of what to do if the user supplies --advice and --no-advice > simultaneously if we only have one option.
Regarding what to do if those two options are both supplied, it's simple, just error out with an appropriate error message. There are already similar situations in the code, e.g. with the -k and --rfc options for git-format-patch(1).