From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (Apr 2017, #03; Tue, 18)
Date: Wed, 19 Apr 2017 16:41:45 +0700 [thread overview]
Message-ID: <20170419094145.GA9051@ash> (raw)
In-Reply-To: <xmqqwpah9ci5.fsf@gitster.mtv.corp.google.com>
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@gmail.com>
---
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< --
next prev parent reply other threads:[~2017-04-19 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 5:45 What's cooking in git.git (Apr 2017, #03; Tue, 18) Junio C Hamano
2017-04-19 9:41 ` Duy Nguyen [this message]
2017-04-19 17:22 ` Stefan Beller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170419094145.GA9051@ash \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.