Subject: Re: [PATCH v2 1/1] advice: add --no-advice global option

From: Junio C Hamano <[email-masked]>
Date: Mon, 29 Apr 2024 06:48:33 -0700

Dragan Simic <[email-masked]> 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.