aboutsummaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2008-02-11 01:23:03 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-10 18:42:06 -0800
commit7a31cc0f96681d6cba54b38bb87daa2440bef448 (patch)
treee3305fc2187232fdf8cf67c34a21409670126a77 /t/t1300-repo-config.sh
parent527270689c364bea9b0630df9bae5e09c2071c1e (diff)
downloadgit-7a31cc0f96681d6cba54b38bb87daa2440bef448.tar.gz
git-7a31cc0f96681d6cba54b38bb87daa2440bef448.tar.xz
config: Fix --unset for continuation lines
find_beginning_of_line didn't take into account that the previous line might have ended with \ in which case it shouldn't stop but continue its search. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-xt/t1300-repo-config.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 42eac2a7c..44dcc1f94 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -71,6 +71,25 @@ EOF
test_expect_success 'non-match result' 'cmp .git/config expect'
+cat > .git/config <<\EOF
+[alpha]
+bar = foo
+[beta]
+baz = multiple \
+lines
+EOF
+
+test_expect_success 'unset with cont. lines' \
+ 'git config --unset beta.baz'
+
+cat > expect <<\EOF
+[alpha]
+bar = foo
+[beta]
+EOF
+
+test_expect_success 'unset with cont. lines is correct' 'cmp .git/config expect'
+
cat > .git/config << EOF
[beta] ; silly comment # another comment
noIndent= sillyValue ; 'nother silly comment