RE: [PATCH 2/2] t: use test_config whenever possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Firmin Martin wrote:
> diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh
> index ed11569d8d..ff18263171 100755
> --- a/t/t5526-fetch-submodules.sh
> +++ b/t/t5526-fetch-submodules.sh
> @@ -418,7 +418,7 @@ test_expect_success "'fetch.recurseSubmodules=on-demand' overrides global config
>  		git fetch --recurse-submodules
>  	) &&
>  	add_upstream_commit &&
> -	git config --global fetch.recurseSubmodules false &&
> +	test_config_global fetch.recurseSubmodules false &&
>  	head1=$(git rev-parse --short HEAD) &&
>  	git add submodule &&
>  	git commit -m "new submodule" &&
> @@ -429,11 +429,7 @@ test_expect_success "'fetch.recurseSubmodules=on-demand' overrides global config
>  	(
>  		cd downstream &&
>  		git config fetch.recurseSubmodules on-demand &&

Uhm:

  test_config fetch.recurseSubmodules on-demand &&

> -		git fetch >../actual.out 2>../actual.err
> -	) &&
> -	git config --global --unset fetch.recurseSubmodules &&
> -	(
> -		cd downstream &&
> +		git fetch >../actual.out 2>../actual.err &&
>  		git config --unset fetch.recurseSubmodules


Then the above line can be removed too.

>  	) &&
>  	test_must_be_empty actual.out &&
> @@ -446,7 +442,7 @@ test_expect_success "'submodule.<sub>.fetchRecurseSubmodules=on-demand' override
>  		git fetch --recurse-submodules
>  	) &&
>  	add_upstream_commit &&
> -	git config fetch.recurseSubmodules false &&
> +	test_config fetch.recurseSubmodules false &&
>  	head1=$(git rev-parse --short HEAD) &&
>  	git add submodule &&
>  	git commit -m "new submodule" &&
> @@ -457,11 +453,7 @@ test_expect_success "'submodule.<sub>.fetchRecurseSubmodules=on-demand' override
>  	(
>  		cd downstream &&
>  		git config submodule.submodule.fetchRecurseSubmodules on-demand &&

Ditto.

Very nice cleanup.

-- 
Felipe Contreras



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux