summaryrefslogtreecommitdiff
path: root/t/t3701-add-interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-14 20:54:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-14 20:54:22 (GMT)
commitdf04a316176d5ba44422c2c6b0cb1a9fc31901e5 (patch)
tree44fae97cc312ba6841416d5d999594a128eb7071 /t/t3701-add-interactive.sh
parent433b8aac2eb7a8bc3e383a072f7df7d15c4aabbb (diff)
parentda8063522f7f797cf722f28979aefbe2a508f800 (diff)
downloadgit-df04a316176d5ba44422c2c6b0cb1a9fc31901e5.zip
git-df04a316176d5ba44422c2c6b0cb1a9fc31901e5.tar.gz
git-df04a316176d5ba44422c2c6b0cb1a9fc31901e5.tar.bz2
Merge branch 'jk/diff-honor-wserrhighlight-in-plumbing'
The diff-* plumbing family of subcommands now pay attention to the diff.wsErrorHighlight configuration, which has been ignored before; this allows "git add -p" to also show the whitespace problems to the end user. * jk/diff-honor-wserrhighlight-in-plumbing: diff: move diff.wsErrorHighlight to "basic" config
Diffstat (limited to 't/t3701-add-interactive.sh')
-rwxr-xr-xt/t3701-add-interactive.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index e36fd0a..5bae6e5 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -553,6 +553,19 @@ test_expect_success 'diffs can be colorized' '
grep "$(printf "\\033")" output
'
+test_expect_success 'colorized diffs respect diff.wsErrorHighlight' '
+ git reset --hard &&
+
+ echo "old " >test &&
+ git add test &&
+ echo "new " >test &&
+
+ printf y >y &&
+ force_color git -c diff.wsErrorHighlight=all add -p >output.raw 2>&1 <y &&
+ test_decode_color <output.raw >output &&
+ grep "old<" output
+'
+
test_expect_success 'diffFilter filters diff' '
git reset --hard &&