aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-11-20 21:22:19 +0100
committerJunio C Hamano <junkio@cox.net>2005-11-21 14:04:28 -0800
commitb17e659dd4007cb1d3eb5ac32b524c0c5ab59601 (patch)
tree1a2d1ce9be64d0c7709f56079957eccdac8bd87e /t
parent3dd94e3b2e2f5b00512273f96ab5628c742c112c (diff)
downloadgit-b17e659dd4007cb1d3eb5ac32b524c0c5ab59601.tar.gz
git-b17e659dd4007cb1d3eb5ac32b524c0c5ab59601.tar.xz
Allow hierarchical section names
A .git/config like follows becomes valid with this patch: [remote.junio] url = git://git.kernel.org/pub/scm/git/git.git pull = master:junio todo:todo +pu:pu [remote.ibook] url = ibook:git/ pull = master:ibook push = master:quetzal (This patch only does the ini file thing, git-fetch and friends still ignore these values). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rw-r--r--t/t1300-config-set.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t1300-config-set.sh b/t/t1300-config-set.sh
index 59b6c4c85..7a5849ae6 100644
--- a/t/t1300-config-set.sh
+++ b/t/t1300-config-set.sh
@@ -248,5 +248,24 @@ test_expect_failure 'invalid key' 'git-config-set inval.2key blabla'
test_expect_success 'correct key' 'git-config-set 123456.a123 987'
+test_expect_success 'hierarchical section' \
+ 'git-config-set 1.2.3.alpha beta'
+
+cat > expect << EOF
+[beta] ; silly comment # another comment
+noIndent= sillyValue ; 'nother silly comment
+
+# empty line
+ ; comment
+[nextSection]
+ NoNewLine = wow2 for me
+[123456]
+ a123 = 987
+[1.2.3]
+ alpha = beta
+EOF
+
+test_expect_success 'hierarchical section value' 'cmp .git/config expect'
+
test_done