summaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-06 18:39:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-04-06 18:39:12 (GMT)
commit01e1d54418a016fb305cb29295f54a86c57dc316 (patch)
treef187a2e092eb7900fd557d1f76612d6340e90b2f /t/t1300-repo-config.sh
parentaad627e3c0e7dcf5a59da80cb424e8a4093b0324 (diff)
parentd1f884986d4bdea6b2d5f424ef7d2ca441070a61 (diff)
downloadgit-01e1d54418a016fb305cb29295f54a86c57dc316.zip
git-01e1d54418a016fb305cb29295f54a86c57dc316.tar.gz
git-01e1d54418a016fb305cb29295f54a86c57dc316.tar.bz2
Merge branch 'jk/submodule-c-credential'
"git -c credential.<var>=<value> submodule" can now be used to propagate configuration variables related to credential helper down to the submodules. * jk/submodule-c-credential: git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS git: submodule honor -c credential.* from command line quote: implement sq_quotef() submodule: fix segmentation fault in submodule--helper clone submodule: fix submodule--helper clone usage submodule: check argc count for git submodule--helper clone submodule: don't pass empty string arguments to submodule--helper clone
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-xt/t1300-repo-config.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 3d6f1db..d934a24 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -1087,6 +1087,20 @@ test_expect_success 'git -c complains about empty key and value' '
test_must_fail git -c "" rev-parse
'
+test_expect_success 'multiple git -c appends config' '
+ test_config alias.x "!git -c x.two=2 config --get-regexp ^x\.*" &&
+ cat >expect <<-\EOF &&
+ x.one 1
+ x.two 2
+ EOF
+ git -c x.one=1 x >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'git -c is not confused by empty environment' '
+ GIT_CONFIG_PARAMETERS="" git -c x.one=1 config --list
+'
+
test_expect_success 'git config --edit works' '
git config -f tmp test.value no &&
echo test.value=yes >expect &&