Re: [PATCH 3/9] submodule: add gitdir path config override

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

 



On 2025.08.17 00:36, Adrian Ratiu wrote:
[snip]
> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
> index 178c386212..f4d4fb8397 100755
> --- a/t/t7400-submodule-basic.sh
> +++ b/t/t7400-submodule-basic.sh
> @@ -13,6 +13,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
>  export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>  
>  . ./test-lib.sh
> +. "$TEST_DIRECTORY"/lib-verify-submodule-gitdir-path.sh
>  
>  test_expect_success 'setup - enable local submodules' '
>  	git config --global protocol.file.allow always
> @@ -1505,4 +1506,18 @@ test_expect_success 'submodule add fails when name is reused' '
>  	)
>  '
>  
> +test_expect_success 'submodule helper gitdir config overrides' '
> +	verify_submodule_gitdir_path test-submodule child submodules/child &&
> +	(
> +		cd test-submodule &&
> +		git config submodule.child.gitdirpath ".git/submodules/custom-child"
> +	) &&
> +	verify_submodule_gitdir_path test-submodule child submodules/custom-child &&
> +	(
> +		cd test-submodule &&
> +		git config --unset submodule.child.gitdirpath
> +	) &&
> +	verify_submodule_gitdir_path test-submodule child submodules/child
> +'
> +

Rather than `( cd test-submodule && git config ... )` here, you should
use `test_config -C test-submodule ...` and `test_unconfig -C
test-submodule ...`




[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