After renaming a section, print any trailing variable definitions

Signed-off-by: Alex Vandiver <alex@chmrr.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alex Vandiver
2009-07-24 17:21:44 -04:00
committed by Junio C Hamano
parent a4c0d463c0
commit 9a5abfc737
2 changed files with 41 additions and 3 deletions

View File

@ -459,6 +459,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