X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ftest-lib.sh;h=a290011fa782ede7ede27a13b2b47a79161b5c80;hb=7b3bdbb335b6be938b4748e86a41357e51c97804;hp=c582964b0d26bedcc69b4f7cc787c4deccfab6b9;hpb=40a56f45bcfeb5443bbd3b7f9e9f7ffd570d5398;p=git.git diff --git a/t/test-lib.sh b/t/test-lib.sh index c582964b0..a290011fa 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -63,7 +63,16 @@ export GIT_MERGE_VERBOSITY export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME export EDITOR -GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u} + +if test -z "$GIT_TEST_CMP" +then + if test -n "$GIT_TEST_CMP_USE_COPIED_CONTEXT" + then + GIT_TEST_CMP="$DIFF -c" + else + GIT_TEST_CMP="$DIFF -u" + fi +fi # Protect ourselves from common misconfiguration to export # CDPATH into the environment