Merge branch 'jc/hide-cr-in-diff-from-less'

* jc/hide-cr-in-diff-from-less:
  diff: Help "less" hide ^M from the output
This commit is contained in:
Junio C Hamano
2008-09-07 23:45:40 -07:00
3 changed files with 34 additions and 3 deletions

View File

@ -178,4 +178,16 @@ test_expect_success 'trailing empty lines (2)' '
'
test_expect_success 'do not color trailing cr in context' '
git config --unset core.whitespace
rm -f .gitattributes &&
echo AAAQ | tr Q "\015" >G &&
git add G &&
echo BBBQ | tr Q "\015" >>G
git diff --color G | tr "\015" Q >output &&
grep "BBB.*${blue_grep}Q" output &&
grep "AAA.*\[mQ" output
'
test_done