On 2024-04-29 07:01, James Liu wrote:
Thanks for the feedback Dragan!
Thank you for working on the patch.
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).