Subject: Re: [PATCH 3/2] git.c: make sure we do not leak GIT_* to alias scripts

From: Junio C Hamano <[email-masked]>
Date: Tue, 08 Dec 2015 15:55:24 -0800

Jeff King <[email-masked]> writes:

> It fails for me when run via "make" (with prove or without) but not as
> "./t0001-init.sh". Looks like extra variables from my config.mak leak
> through:
>
>   $ make t0001-init.sh GIT_TEST_OPTS="-v -i"
>   [...]
>   --- expected    2015-12-08 17:18:06.304699181 +0000
>   +++ actual      2015-12-08 17:18:06.312699180 +0000
>   @@ -9,5 +9,9 @@
>    GIT_MERGE_VERBOSITY
>    GIT_PREFIX
>    GIT_TEMPLATE_DIR
>   +GIT_TEST_GIT_DAEMON
>   +GIT_TEST_HTTPD
>   +GIT_TEST_OPTS
>    GIT_TEXTDOMAINDIR
>    GIT_TRACE_BARE
>   +MAKEFLAGS
>   not ok 6 - No extra GIT_* on alias scripts
>
> Any GIT_TEST_* is allowed through by test-lib.sh.

Also GIT_PROVE_OPTS (which caused false positive for me).

Perhaps grab "env" output outside the alias to create the expected
(instead of a random handcrafted list that you have to maintain as
the test suite evolves), and compare it from within the alias, or
something?