From: Junio C Hamano Date: Thu, 29 Sep 2016 21:00:10 GMT Subject: [PATCH v2 5/9] t1300: disable system-wide config for tests that wants to read from -c Message-ID: <20160929210014.3874-6-gitster@pobox.com> In-Reply-To: <20160929210014.3874-1-gitster@pobox.com> This test wants to do git -c x.two=2 config --get-regexp ^x\.* and see x.two that came from the one-shot configuration in its output. This form cannot be limited with "--local", as it limits the input to the local configuration file and makes these one-shot settings ignored. At this point, the test knows that there is no variable that match x.* in its local configuration, and it also was OK to assume that there is nothing in the system-wide config or global one. Make sure that assumption holds by using the GIT_CONFIG_NOSYSTEM environment, as we may add anything to t/gitconfig-for-test later. Signed-off-by: Junio C Hamano --- t/t1300-repo-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 940469339bd2..95734034e0d5 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -1093,6 +1093,7 @@ test_expect_success 'multiple git -c appends config' ' x.one 1 x.two 2 EOF + GIT_CONFIG_NOSYSTEM=1 \ git -c x.one=1 x >actual && test_cmp expect actual ' -- 2.10.0-589-g5adf4e1