Subject: Re: [PATCH 0/2] advice: add "all" option to disable all hints

From: Junio C Hamano <[email-masked]>
Date: Wed, 24 Apr 2024 07:31:04 -0700

Patrick Steinhardt <[email-masked]> writes:

>> Do not close that communication channel on us.
>
> While I agree that it might not be a good idea to set it for our users,
> the usecase mentioned by this patch series is scripting. And here I very
> much agree with the sentiment that it makes sense to give an easy knob
> to disable all advice (disclosure: James is part of the Gitaly team at
> GitLab, and that is where this feature comes from, so I am very much
> biased).

Of course, as you mention, the kosher way is to use the plumbing
where there is no advice messages.  If certain functionalitly is
lacking in the set of plumbing commands, adding them would benefit
everybody, not just Gitaly.

If this is for scripting, make it easy for scripts to use while
making it very very hard for users to trigger in their interactive
environments.  A configuration variable, by design, is a very bad
choice to do so, as it is "set it once and forget about it", which
defeats the whole purpose of advice messages.  An environment
variable is very much in the same category in that you can set it in
~/.login or ~/.profile and forget about it.

A "git" wide command line option, similar to "--no-pager" or
"--literal-pathspecs", is probably an acceptable avenue.

Thanks.