diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-04-02 12:02:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-02 12:02:30 -0700 |
commit | cb365a7a564152662e3f9c5b9a92e37aaf726ed9 (patch) | |
tree | 98c9c3721fa7f5984c4109cb2dcb1b56ae053b17 /t | |
parent | 1e7ef0253c91bf2f25f9d8e44795b642737e664e (diff) | |
parent | 4e218f54b3de6aa8ef7d15020c4507031a519f7d (diff) | |
download | git-cb365a7a564152662e3f9c5b9a92e37aaf726ed9.tar.gz |
Merge branch 'js/maint-diff-temp-smudge' into maint
* js/maint-diff-temp-smudge:
Smudge the files fed to external diff and textconv
Diffstat (limited to 't')
-rwxr-xr-x | t/t4020-diff-external.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh index 281680d95a..f8c99f1a98 100755 --- a/t/t4020-diff-external.sh +++ b/t/t4020-diff-external.sh @@ -136,4 +136,20 @@ test_expect_success 'GIT_EXTERNAL_DIFF with more than one changed files' ' GIT_EXTERNAL_DIFF=echo git diff ' +echo "#!$SHELL_PATH" >fake-diff.sh +cat >> fake-diff.sh <<\EOF +cat $2 >> crlfed.txt +EOF +chmod a+x fake-diff.sh + +keep_only_cr () { + tr -dc '\015' +} + +test_expect_success 'external diff with autocrlf = true' ' + git config core.autocrlf true && + GIT_EXTERNAL_DIFF=./fake-diff.sh git diff && + test $(wc -l < crlfed.txt) = $(cat crlfed.txt | keep_only_cr | wc -c) +' + test_done |