summaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-01-20 01:25:37 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-20 01:55:14 (GMT)
commit6f71686e0bac2337cdaf9057893a16a47e7d1033 (patch)
tree06fd7a1341f2544fe0011bb4c24989bc2209e626 /t/t1300-repo-config.sh
parentd23842fd53e61f32c189a6ec902c4133abf29878 (diff)
downloadgit-6f71686e0bac2337cdaf9057893a16a47e7d1033.zip
git-6f71686e0bac2337cdaf9057893a16a47e7d1033.tar.gz
git-6f71686e0bac2337cdaf9057893a16a47e7d1033.tar.bz2
config_set_multivar(): disallow newlines in keys
This will no longer work: $ git repo-config 'key.with newline' some-value Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
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 60acdd3..eb7455b 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -418,5 +418,11 @@ EOF
test_expect_success 'quoting' 'cmp .git/config expect'
+test_expect_failure 'key with newline' 'git repo-config key.with\\\
+newline 123'
+
+test_expect_success 'value with newline' 'git repo-config key.sub value.with\\\
+newline'
+
test_done