diff options
author | Frank Lichtenheld <frank@lichtenheld.de> | 2008-02-11 01:23:03 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-10 18:42:06 -0800 |
commit | 7a31cc0f96681d6cba54b38bb87daa2440bef448 (patch) | |
tree | e3305fc2187232fdf8cf67c34a21409670126a77 /t/t1300-repo-config.sh | |
parent | 527270689c364bea9b0630df9bae5e09c2071c1e (diff) | |
download | git-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-x | t/t1300-repo-config.sh | 19 |
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 |