aboutsummaryrefslogtreecommitdiffstats
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-05-10 10:38:31 -0700
committerJunio C Hamano <gitster@pobox.com>2016-05-10 10:38:31 -0700
commit8ab8d959c6bf2f111590a230c841c352b8cf6518 (patch)
tree022d9d6eee6d6508bea4dc5b81be0de57b588f33 /t/t1300-repo-config.sh
parente31165ce69ef3986e8b5477d52cc7d4e19b4212d (diff)
parent89044baa8b8a14b48e78a42ebdc43cfcd144ce28 (diff)
downloadgit-8ab8d959c6bf2f111590a230c841c352b8cf6518.tar.gz
Merge branch 'jk/submodule-c-credential' into js/http-custom-headers
* jk/submodule-c-credential: submodule: stop sanitizing config options submodule: use prepare_submodule_repo_env consistently submodule--helper: move config-sanitizing to submodule.c submodule: export sanitized GIT_CONFIG_PARAMETERS t5550: break submodule config test into multiple sub-tests t5550: fix typo in $HTTPD_URL 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 6767da87cb..1867a0fd41 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 &&