diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-07 13:14:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-07 13:14:08 -0700 |
commit | 4c8ad06e7c20741c7330ff791e06ef20142c91e4 (patch) | |
tree | 713276018af92549570946308b4915e4ea013b3e /t | |
parent | Merge branch 'pw/t5800-import-race-fix' into maint (diff) | |
parent | config: reject bogus section names for --rename-section (diff) | |
download | tgif-4c8ad06e7c20741c7330ff791e06ef20142c91e4.tar.xz |
Merge branch 'jk/maint-config-bogus-section' into maint
"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-x | t/t1300-repo-config.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 36e227b3bb..a477453e2e 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 |