aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2010-03-26 23:53:57 +0100
committerJunio C Hamano <gitster@pobox.com>2010-03-28 09:48:25 -0700
commit8b1fa778676ae94f7a6d4113fa90947b548154dd (patch)
treeebdd33abc21f7dc32fa413bdf6b77b651c0daeda /t
parentf1ba1c90e1704e937ff59ee510a8d46a5ab52a1a (diff)
downloadgit-8b1fa778676ae94f7a6d4113fa90947b548154dd.tar.gz
git-8b1fa778676ae94f7a6d4113fa90947b548154dd.tar.xz
Allow passing of configuration parameters in the command line
The values passed this way will override whatever is defined in the config files. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t1300-repo-config.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index f11f98c3c..64f05080b 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -824,4 +824,12 @@ test_expect_success 'check split_cmdline return' "
test_must_fail git merge master
"
+test_expect_success 'git -c "key=value" support' '
+ test "z$(git -c name=value config name)" = zvalue &&
+ test "z$(git -c core.name=value config core.name)" = zvalue &&
+ test "z$(git -c CamelCase=value config camelcase)" = zvalue &&
+ test "z$(git -c flag config --bool flag)" = ztrue &&
+ test_must_fail git -c core.name=value config name
+'
+
test_done