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:

committed by
Junio C Hamano

parent
a4c0d463c0
commit
9a5abfc737
@ -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
|
||||
|
Reference in New Issue
Block a user