summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-31 17:35:20 -0700
committerJunio C Hamano <gitster@pobox.com>2010-05-31 17:35:20 -0700
commit7b3bdbb335b6be938b4748e86a41357e51c97804 (patch)
tree06ebfd196fa75f0e8cc1bbc23449b60807f824ba /t/test-lib.sh
parent4fdf71be1ca3a817851a14f91b75e7d30f885a48 (diff)
downloadgit-7b3bdbb335b6be938b4748e86a41357e51c97804.tar.gz
fixup: do not unconditionally disable "diff -u"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c582964b0d..a290011fa7 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