Do not use "diff" found on PATH while building and installing
Some of the flags used with the first diff found in PATH cause the vendor diff to choke. Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Gary V. Vaughan committed
May 14, 2010 at 09:31 UTC
d1b1a919461c2f00d4e10f5ba227b13f800a6ac3
5 files changed
+7
-3
Documentation/install-webdoc.sh
+1
-1
@@ -12,7 +12,7 @@ do
12
then
13
: did not match
14
elif test -f "$T/$h" &&
15
- diff -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h"
15
+ $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h"
16
then
17
:; # up to date
18
else
Makefile
+3
-1
@@ -287,6 +287,7 @@ export prefix bindir sharedir sysconfdir
287
CC = gcc
288
AR = ar
289
RM = rm -f
290
+DIFF = diff
291
TAR = tar
292
FIND = find
293
INSTALL = install
@@ -1460,7 +1461,7 @@ endif
1461
ALL_CFLAGS += $(BASIC_CFLAGS)
1462
ALL_LDFLAGS += $(BASIC_LDFLAGS)
1463
1463
-export TAR INSTALL DESTDIR SHELL_PATH
1464
+export DIFF TAR INSTALL DESTDIR SHELL_PATH
1465
1466
1467
### Build rules
@@ -1877,6 +1878,7 @@ GIT-CFLAGS: FORCE
1878
GIT-BUILD-OPTIONS: FORCE
1879
@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
1880
@echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@
1881
+ @echo DIFF=\''$(subst ','\'',$(subst ','\'',$(DIFF)))'\' >>$@
1882
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
1883
@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
1884
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
config.mak.in
+1
@@ -8,6 +8,7 @@ LDFLAGS = @LDFLAGS@
8
CC_LD_DYNPATH = @CC_LD_DYNPATH@
9
AR = @AR@
10
TAR = @TAR@
11
+DIFF = @DIFF@
12
#INSTALL = @INSTALL@ # needs install-sh or install.sh in sources
13
TCLTK_PATH = @TCLTK_PATH@
14
configure.ac
+1
@@ -362,6 +362,7 @@ fi
362
#AC_PROG_INSTALL # needs install-sh or install.sh in sources
363
AC_CHECK_TOOLS(AR, [gar ar], :)
364
AC_CHECK_PROGS(TAR, [gtar tar])
365
+AC_CHECK_PROGS(DIFF, [gnudiff gdiff diff])
366
# TCLTK_PATH will be set to some value if we want Tcl/Tk
367
# or will be empty otherwise.
368
if test -z "$NO_TCLTK"; then
git-merge-one-file.sh
+1
-1
@@ -107,7 +107,7 @@ case "${1:-.}${2:-.}${3:-.}" in
107
# remove lines that are unique to ours.
108
orig=`git-unpack-file $2`
109
sz0=`wc -c <"$orig"`
110
- diff -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add
110
+ $DIFF -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add
111
sz1=`wc -c <"$orig"`
112
113
# If we do not have enough common material, it is not