fixup: do not unconditionally disable "diff -u"

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2010-05-31 17:35:20 -07:00
parent 4fdf71be1c
commit 7b3bdbb335
3 changed files with 14 additions and 5 deletions

View File

@ -1374,6 +1374,10 @@ ifdef USE_NED_ALLOCATOR
COMPAT_OBJS += compat/nedmalloc/nedmalloc.o COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
endif endif
ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
export GIT_TEST_CMP_USE_COPIED_CONTEXT
endif
ifeq ($(TCLTK_PATH),) ifeq ($(TCLTK_PATH),)
NO_TCLTK=NoThanks NO_TCLTK=NoThanks
endif endif

View File

@ -6,14 +6,10 @@
-include ../config.mak -include ../config.mak
#GIT_TEST_OPTS=--verbose --debug #GIT_TEST_OPTS=--verbose --debug
GIT_TEST_CMP ?= $(DIFF)
SHELL_PATH ?= $(SHELL) SHELL_PATH ?= $(SHELL)
TAR ?= $(TAR) TAR ?= $(TAR)
RM ?= rm -f RM ?= rm -f
# Make sure test-lib.sh uses make's value of GIT_TEST_CMP
export GIT_TEST_CMP
# Shell quote; # Shell quote;
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))

View File

@ -63,7 +63,16 @@ export GIT_MERGE_VERBOSITY
export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
export EDITOR 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 # Protect ourselves from common misconfiguration to export
# CDPATH into the environment # CDPATH into the environment