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

From: Dragan Simic <[email-masked]>
Date: Tue, 30 Apr 2024 08:24:33 +0200

Hello James,

On 2024-04-30 07:18, Patrick Steinhardt wrote:
> On Tue, Apr 30, 2024 at 11:47:24AM +1000, James Liu wrote:
>> +/*
>> + * Environment variable used to propagate the --no-advice global 
>> option to the
>> + * advice_enabled() helper, even when run in a subprocess.
>> + * This is an internal variable that should not be set by the user.
>> + */
>> +#define GIT_ADVICE "GIT_ADVICE"
> 
> Almost all of the other defines in this file have an "_ENVIRONMENT"
> suffix. We should probably do the same here to mark it as the name of
> the environment variable, which otherwise wouldn't be obvious.

Just for the record, I already pointed that out... [1]

> We could add two more tests that explicitly set the environment
> variable, once to `true` and once to `false`. This would at least
> somewhat represent the case of running Git subcommands, even though we
> cannot test whether Git actually knows to set the envvar like this.

... and this as well. [1]

[1] 
https://lore.kernel.org/git/[email-masked]/