summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4fdf71b)
raw | patch | inline | side by side (parent: 4fdf71b)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 1 Jun 2010 00:35:20 +0000 (17:35 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 1 Jun 2010 00:35:20 +0000 (17:35 -0700) |
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | patch | blob | history | |
t/Makefile | patch | blob | history | |
t/test-lib.sh | patch | blob | history |
diff --git a/Makefile b/Makefile
index 668dbc96ca3ccefb5117155012275cc5b2fe28da..c8cc9e280adf309a1f14271adebd3f5c364d4b0f 100644 (file)
--- a/Makefile
+++ b/Makefile
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 93a64750eb75f14492eb5e2f7ac2eb721a8560a6..25c559bb49d04586c69242cd7ef03713f0939e9d 100644 (file)
--- a/t/Makefile
+++ b/t/Makefile
-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 c582964b0d26bedcc69b4f7cc787c4deccfab6b9..a290011fa782ede7ede27a13b2b47a79161b5c80 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
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