summaryrefslogtreecommitdiff
path: root/t/t0030-stripspace.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-11-23 11:23:17 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-11-23 11:23:17 -0800
commitbd53f38d52b87340ad791290d700c5c7e8587f23 (patch)
treeecff6137224ddcd8d0e20a9a7c68fec94f056841 /t/t0030-stripspace.sh
parentMerge branch 'jc/for-each-ref-head-segfault-fix' (diff)
parentrebase -i: handle core.commentChar=auto (diff)
downloadtgif-bd53f38d52b87340ad791290d700c5c7e8587f23.tar.xz
Merge branch 'js/rebase-i-commentchar-fix'
"git rebase -i" did not work well with core.commentchar configuration variable for two reasons, both of which have been fixed. * js/rebase-i-commentchar-fix: rebase -i: handle core.commentChar=auto stripspace: respect repository config rebase -i: highlight problems with core.commentchar
Diffstat (limited to 't/t0030-stripspace.sh')
-rwxr-xr-xt/t0030-stripspace.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh
index 29e91d861c..bbf3e39e3d 100755
--- a/t/t0030-stripspace.sh
+++ b/t/t0030-stripspace.sh
@@ -432,6 +432,15 @@ test_expect_success '-c with changed comment char' '
test_cmp expect actual
'
+test_expect_success '-c with comment char defined in .git/config' '
+ test_config core.commentchar = &&
+ printf "= foo\n" >expect &&
+ printf "foo" | (
+ mkdir sub && cd sub && git stripspace -c
+ ) >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'avoid SP-HT sequence in commented line' '
printf "#\tone\n#\n# two\n" >expect &&
printf "\tone\n\ntwo\n" | git stripspace -c >actual &&