summaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-06-09 11:51:36 -0400
committerJunio C Hamano <gitster@pobox.com>2011-06-22 11:24:50 -0700
commit5bf6529aaa3fa829328ae00ddf7aa851935443b5 (patch)
tree384f4778f9e741969ac8661c2728f67045a94c6f /t/t1300-repo-config.sh
parent28fc3a6857a5d7a6b4f63b2672fb0ce966b0df78 (diff)
downloadgit-5bf6529aaa3fa829328ae00ddf7aa851935443b5.tar.gz
fix "git -c" parsing of values with equals signs
If you do something like: git -c core.foo="value with = in it" ... we would split your option on "=" into three fields and throw away the third one. With this patch we correctly take everything after the first "=" as the value (keys cannot have an equals sign in them, so the parsing is unambiguous). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-xt/t1300-repo-config.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 3db56267ee..ca5058e0d4 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -904,4 +904,10 @@ test_expect_success 'git -c works with aliases of builtins' '
test_cmp expect actual
'
+test_expect_success 'git -c does not split values on equals' '
+ echo "value with = in it" >expect &&
+ git -c core.foo="value with = in it" config core.foo >actual &&
+ test_cmp expect actual
+'
+
test_done