From 9a5abfc737b18c23d060ff3be1ee8df560b81fa5 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 24 Jul 2009 17:21:44 -0400 Subject: After renaming a section, print any trailing variable definitions Signed-off-by: Alex Vandiver Signed-off-by: Junio C Hamano --- t/t1300-repo-config.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 't') 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 @@ -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 -- cgit v1.2.3