{"thread":{"id":"20059","subject":"[PATCH] Failing test; renaming sections can lose assignments on the same line","startedAt":"2009-07-08T20:40:41Z","lastAt":"2009-07-08T20:40:41Z","messageCount":1,"participants":["Alex Vandiver"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"117636","messageId":"1247085641-14772-1-git-send-email-alex@chmrr.net","threadId":"20059","inReplyTo":null,"subject":"[PATCH] Failing test; renaming sections can lose assignments on the same line","fromName":"Alex Vandiver","fromEmail":"alex@chmrr.net","sentAt":"2009-07-08T20:40:41Z","receivedAt":"2009-07-08T20:40:41Z","isPatch":true,"sender":{"key":"alex@chmrr.net","avatar":"https://avatars.githubusercontent.com/u/28347?v=4"},"body":"\nSigned-off-by: Alex Vandiver <alex@chmrr.net>\n---\n\nI noticed the following bug recently:\n\n    echo \"[foo] x = 1\" > testfile\n    git config --file=testfile --rename-section foo bar\n    cat testfile\n    # [bar]\n\nThis is at least a failing test, and I'll look at how complex the\nfix is when I get a few spare tuits.\n\n t/t1300-repo-config.sh |   21 +++++++++++++++++++++\n 1 files changed, 21 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 43ea283..4d576c6 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -460,6 +460,27 @@ EOF\n test_expect_success \"rename succeeded\" \"test_cmp expect .git/config\"\n \n cat >> .git/config << EOF\n+[branch \"vier\"] z = 1\n+EOF\n+\n+test_expect_success \"rename a section with a var on the same line\" \\\n+\t'git config --rename-section branch.vier branch.zwei'\n+\n+cat > expect << EOF\n+# Hallo\n+\t#Bello\n+[branch \"zwei\"]\n+\tx = 1\n+[branch \"zwei\"]\n+\ty = 1\n+[branch \"drei\"]\n+weird\n+[branch \"zwei\"] z = 1\n+EOF\n+\n+test_expect_success \"rename succeeded\" \"test_cmp expect .git/config\"\n+\n+cat >> .git/config << EOF\n   [branch \"zwei\"] a = 1 [branch \"vier\"]\n EOF\n \n-- \n1.6.3.3.473.gb74fc4.dirty\n"}]}