@matheusbsbs / matheus-bagliano / commits / 7b3bdbb335
Fork 0

fixup: do not unconditionally disable "diff -u"

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed May 31, 2010 at 17:35 UTC 7b3bdbb335b6be938b4748e86a41357e51c97804
3 files changed +14 -5
Makefile
+4
@@ -1374,6 +1374,10 @@ ifdef USE_NED_ALLOCATOR
1374 COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
1375 endif
1376
1377 +ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
1378 + export GIT_TEST_CMP_USE_COPIED_CONTEXT
1379 +endif
1380 +
1381 ifeq ($(TCLTK_PATH),)
1382 NO_TCLTK=NoThanks
1383 endif
t/Makefile
-4
@@ -6,14 +6,10 @@
6 -include ../config.mak
7
8 #GIT_TEST_OPTS=--verbose --debug
9 -GIT_TEST_CMP ?= $(DIFF)
9 SHELL_PATH ?= $(SHELL)
10 TAR ?= $(TAR)
11 RM ?= rm -f
12
14 -# Make sure test-lib.sh uses make's value of GIT_TEST_CMP
15 -export GIT_TEST_CMP
16 -
13 # Shell quote;
14 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
15
t/test-lib.sh
+10 -1
@@ -63,7 +63,16 @@ export GIT_MERGE_VERBOSITY
63 export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
64 export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
65 export EDITOR
66 -GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}
66 +
67 +if test -z "$GIT_TEST_CMP"
68 +then
69 + if test -n "$GIT_TEST_CMP_USE_COPIED_CONTEXT"
70 + then
71 + GIT_TEST_CMP="$DIFF -c"
72 + else
73 + GIT_TEST_CMP="$DIFF -u"
74 + fi
75 +fi
76
77 # Protect ourselves from common misconfiguration to export
78 # CDPATH into the environment