Subject: Re: [PATCH 2/4] t13xx: do not assume system config is empty

From: Junio C Hamano <[email-masked]>
Date: Thu, 29 Sep 2016 14:03:39 -0700

Jeff King <[email-masked]> writes:

> Good description.
>
> Signed-off-by: Jeff King <[email-masked]>
>
> of course.
>
>> @@ -1304,6 +1315,7 @@ test_expect_success '--show-origin with --get-regexp' '
>>  		file:$HOME/.gitconfig	user.global true
>>  		file:.git/config	user.local true
>>  	EOF
>> +	GIT_CONFIG_SYSTEM_PATH=$HOME/etc-gitconfig \
>>  	git config --show-origin --get-regexp "user\.[g|l].*" >output &&
>>  	test_cmp expect output
>>  '
>
> This is one is trying to do a multi-file lookup, but we couldn't look in
> the system config before. But to naturally extend it, it ought to look
> like this on top:
>
> diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
> index d2476a8..4dd5ce3 100755
> --- a/t/t1300-repo-config.sh
> +++ b/t/t1300-repo-config.sh
> @@ -1310,11 +1310,12 @@ test_expect_success '--show-origin with single file' '
>  
>  test_expect_success '--show-origin with --get-regexp' '
>  	cat >expect <<-EOF &&
> +		file:$HOME/etc-gitconfig	user.system true
>  		file:$HOME/.gitconfig	user.global true
>  		file:.git/config	user.local true
>  	EOF
>  	GIT_ETC_GITCONFIG=$HOME/etc-gitconfig \
> -	git config --show-origin --get-regexp "user\.[g|l].*" >output &&
> +	git config --show-origin --get-regexp "user\.[g|l|s].*" >output &&
>  	test_cmp expect output
>  '

Makes sense modulo you inherited useless vertical bars from the
original.  I'll squash something like that in but without || ;-)

Thanks.