Re: [PATCH v2 1/1] advice: add --no-advice global option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 29, 2024, 13:48 UTC
- Message-ID
- <xmqqmspc1dqm.fsf@gitster.g>
- In-Reply-To
- <37512328b1f3db4e8075bdb4beeb8929@manjaro.org>
Dragan Simic <dsimic@manjaro.org> writes:
> Huh, I was under impression that having an environment > variable to control this behavior was frowned upon by > Junio?
It is frowned upon. It is secondary who frowns upon it ;-)
We _might_ be able to pass --no-advice to all internal invocations of subprocesses, but that is a chore, and if a code path calls a subprocess that is *not* a git program that in turn calls a git program, such an approach would not work. But an environment variable would.
So using an environment variable as an internal detail and marking it as "internal use only---do not set or unset it yourself" is the best we could do, and I do not think I would mind. At that point, those who set the variable themselves are outside those whose breakage we care about.