aboutsummaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2007-03-02 21:53:33 +0100
committerJunio C Hamano <junkio@cox.net>2007-03-03 19:59:37 -0800
commit118f8b241355b38cd21e644e8620d81f10190627 (patch)
tree49cdd292779b9204b5cf2ef85981952f542c3848 /t/t1300-repo-config.sh
parent253e772edeb56092e0fad43ec0640658671313c5 (diff)
downloadgit-118f8b241355b38cd21e644e8620d81f10190627.tar.gz
git-118f8b241355b38cd21e644e8620d81f10190627.tar.xz
git-config: document --rename-section, provide --remove-section
This patch documents the previously undocumented option --rename-section and adds a new option to zap an entire section. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-xt/t1300-repo-config.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 49b5666b3..ee386cfbf 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -391,6 +391,22 @@ EOF
test_expect_success "rename succeeded" "diff -u expect .git/config"
+cat >> .git/config << EOF
+ [branch "zwei"] a = 1 [branch "vier"]
+EOF
+
+test_expect_success "remove section" "git config --remove-section branch.zwei"
+
+cat > expect << EOF
+# Hallo
+ #Bello
+[branch "drei"]
+weird
+EOF
+
+test_expect_success "section was removed properly" \
+ "diff -u expect .git/config"
+
test_expect_success numbers '
git-config kilo.gram 1k &&