Re: What's cooking in git.git (Apr 2017, #03; Tue, 18)

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

 



On Tue, Apr 18, 2017 at 10:45:22PM -0700, Junio C Hamano wrote:
> * nd/conditional-config-in-early-config (2017-04-17) 3 commits
>  - config: correct file reading order in read_early_config()
>  - config: handle conditional include when $GIT_DIR is not set up
>  - config: prepare to pass more info in git_config_with_options()
> 
>  The recently introduced conditional inclusion of configuration did
>  not work well when early-config mechanism was involved.
> 
>  Will merge to 'next'.

You may want to squash this in before merging to 'next'. I think this
is the last comment from Jeff.

-- 8< --
Subject: [PATCH] fixup! config: correct file reading order in read_early_config()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
---
 t/helper/test-config.c  | 4 ----
 t/t1309-early-config.sh | 3 ++-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/t/helper/test-config.c b/t/helper/test-config.c
index 696d0a52fd..8e3ed6a76c 100644
--- a/t/helper/test-config.c
+++ b/t/helper/test-config.c
@@ -84,10 +84,6 @@ int cmd_main(int argc, const char **argv)
 	struct config_set cs;
 
 	if (argc == 3 && !strcmp(argv[1], "read_early_config")) {
-		const char *cmdline_config = getenv("CMDL_CFG");
-
-		if (cmdline_config)
-			git_config_push_parameter(cmdline_config);
 		read_early_config(early_config_cb, (void *)argv[2]);
 		return 0;
 	}
diff --git a/t/t1309-early-config.sh b/t/t1309-early-config.sh
index c15f18dd96..1af8c454cf 100755
--- a/t/t1309-early-config.sh
+++ b/t/t1309-early-config.sh
@@ -47,13 +47,14 @@ test_expect_success 'ceiling #2' '
 	test xdg = "$(cat output)"
 '
 
+cmdline_config="'test.source=cmdline'"
 test_expect_success 'read config file in right order' '
 	echo "[test]source = home" >>.gitconfig &&
 	git init foo &&
 	(
 		cd foo &&
 		echo "[test]source = repo" >>.git/config &&
-		CMDL_CFG=test.source=cmdline test-config \
+		GIT_CONFIG_PARAMETERS=$cmdline_config test-config \
 			read_early_config test.source >actual &&
 		cat >expected <<-\EOF &&
 		home
-- 
2.11.0.157.gd943d85
-- 8< --



[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]