aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-30 14:46:46 -0700
committerJunio C Hamano <gitster@pobox.com>2012-04-30 14:46:46 -0700
commit563b3527b41a978eeef77d9426be460013c35d88 (patch)
tree5ca590f5d68d5b74b41451403a34220f2d30d455 /t
parent10d4332e007132a38dc61f03c760d355da5cd550 (diff)
parent94a35b1aea88f1ad882cdd111e01410fb6d3eb46 (diff)
downloadgit-563b3527b41a978eeef77d9426be460013c35d88.tar.gz
git-563b3527b41a978eeef77d9426be460013c35d88.tar.xz
Merge branch 'jk/maint-config-bogus-section'
"git config --rename-section" to rename an existing section into a bogus one did not check the new name. By Jeff King * jk/maint-config-bogus-section: config: reject bogus section names for --rename-section
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 36e227b3b..a477453e2 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -550,6 +550,14 @@ EOF
test_expect_success "rename succeeded" "test_cmp expect .git/config"
+test_expect_success 'renaming empty section name is rejected' '
+ test_must_fail git config --rename-section branch.zwei ""
+'
+
+test_expect_success 'renaming to bogus section is rejected' '
+ test_must_fail git config --rename-section branch.zwei "bogus name"
+'
+
cat >> .git/config << EOF
[branch "zwei"] a = 1 [branch "vier"]
EOF