summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-01 00:35:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-01 00:35:20 (GMT)
commit7b3bdbb335b6be938b4748e86a41357e51c97804 (patch)
tree06ebfd196fa75f0e8cc1bbc23449b60807f824ba
parent4fdf71be1ca3a817851a14f91b75e7d30f885a48 (diff)
downloadgit-7b3bdbb335b6be938b4748e86a41357e51c97804.zip
git-7b3bdbb335b6be938b4748e86a41357e51c97804.tar.gz
git-7b3bdbb335b6be938b4748e86a41357e51c97804.tar.bz2
fixup: do not unconditionally disable "diff -u"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Makefile4
-rw-r--r--t/Makefile4
-rw-r--r--t/test-lib.sh11
3 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 668dbc9..c8cc9e2 100644
--- a/Makefile
+++ b/Makefile
@@ -1374,6 +1374,10 @@ ifdef USE_NED_ALLOCATOR
COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
endif
+ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
+ export GIT_TEST_CMP_USE_COPIED_CONTEXT
+endif
+
ifeq ($(TCLTK_PATH),)
NO_TCLTK=NoThanks
endif
diff --git a/t/Makefile b/t/Makefile
index 93a6475..25c559b 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -6,14 +6,10 @@
-include ../config.mak
#GIT_TEST_OPTS=--verbose --debug
-GIT_TEST_CMP ?= $(DIFF)
SHELL_PATH ?= $(SHELL)
TAR ?= $(TAR)
RM ?= rm -f
-# Make sure test-lib.sh uses make's value of GIT_TEST_CMP
-export GIT_TEST_CMP
-
# Shell quote;
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c582964..a290011 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