summaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorAlex Vandiver <alex@chmrr.net>2009-07-24 21:21:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-07-25 06:42:44 (GMT)
commit9a5abfc737b18c23d060ff3be1ee8df560b81fa5 (patch)
treed3775b7cf9119856b46adb359dcb8b896487c887 /t/t1300-repo-config.sh
parenta4c0d463c0a1b38b7af45c1e7dd5608860eb1e28 (diff)
downloadgit-9a5abfc737b18c23d060ff3be1ee8df560b81fa5.zip
git-9a5abfc737b18c23d060ff3be1ee8df560b81fa5.tar.gz
git-9a5abfc737b18c23d060ff3be1ee8df560b81fa5.tar.bz2
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>
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-xt/t1300-repo-config.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 43ea283..8c43dcd 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