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/37512328b1f3db4e8075bdb4beeb8929@xxxxxxxxxxx/