diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-07-25 11:44:52 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-25 11:44:52 +0400 |
commit | a7c1ef3e03985c70aeb0825634471bb6240f4fcb (patch) | |
tree | f497cb6f22a7861d22a1b3947aecbb5cc2747460 /t | |
parent | e34bbd3b3c3c12e4131e836486cb733fd1f7feed (diff) | |
parent | 9a5abfc737b18c23d060ff3be1ee8df560b81fa5 (diff) |
Merge branch 'av/maint-config-reader'
* av/maint-config-reader:
After renaming a section, print any trailing variable definitions
Make section_name_match start on '[', and return the length on success
Diffstat (limited to 't')
-rwxr-xr-x | t/t1300-repo-config.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 43ea283242..8c43dcde8a 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -460,6 +460,28 @@ EOF test_expect_success "rename succeeded" "test_cmp expect .git/config" cat >> .git/config << EOF +[branch "vier"] z = 1 +EOF + +test_expect_success "rename a section with a var on the same line" \ + 'git config --rename-section branch.vier branch.zwei' + +cat > expect << EOF +# Hallo + #Bello +[branch "zwei"] + x = 1 +[branch "zwei"] + y = 1 +[branch "drei"] +weird +[branch "zwei"] + z = 1 +EOF + +test_expect_success "rename succeeded" "test_cmp expect .git/config" + +cat >> .git/config << EOF [branch "zwei"] a = 1 [branch "vier"] EOF |