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>
This commit is contained in:
Gary V. Vaughan 2010-05-14 09:31:36 +00:00 committed by Junio C Hamano
parent 4b05548fc0
commit d1b1a91946
5 changed files with 7 additions and 3 deletions

View File

@ -12,7 +12,7 @@ do
then then
: did not match : did not match
elif test -f "$T/$h" && elif test -f "$T/$h" &&
diff -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h" $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h"
then then
:; # up to date :; # up to date
else else

View File

@ -287,6 +287,7 @@ export prefix bindir sharedir sysconfdir
CC = gcc CC = gcc
AR = ar AR = ar
RM = rm -f RM = rm -f
DIFF = diff
TAR = tar TAR = tar
FIND = find FIND = find
INSTALL = install INSTALL = install
@ -1460,7 +1461,7 @@ endif
ALL_CFLAGS += $(BASIC_CFLAGS) ALL_CFLAGS += $(BASIC_CFLAGS)
ALL_LDFLAGS += $(BASIC_LDFLAGS) ALL_LDFLAGS += $(BASIC_LDFLAGS)
export TAR INSTALL DESTDIR SHELL_PATH export DIFF TAR INSTALL DESTDIR SHELL_PATH
### Build rules ### Build rules
@ -1877,6 +1878,7 @@ GIT-CFLAGS: FORCE
GIT-BUILD-OPTIONS: FORCE GIT-BUILD-OPTIONS: FORCE
@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@ @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
@echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@ @echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@
@echo DIFF=\''$(subst ','\'',$(subst ','\'',$(DIFF)))'\' >>$@
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@ @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@ @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@ @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@

View File

@ -8,6 +8,7 @@ LDFLAGS = @LDFLAGS@
CC_LD_DYNPATH = @CC_LD_DYNPATH@ CC_LD_DYNPATH = @CC_LD_DYNPATH@
AR = @AR@ AR = @AR@
TAR = @TAR@ TAR = @TAR@
DIFF = @DIFF@
#INSTALL = @INSTALL@ # needs install-sh or install.sh in sources #INSTALL = @INSTALL@ # needs install-sh or install.sh in sources
TCLTK_PATH = @TCLTK_PATH@ TCLTK_PATH = @TCLTK_PATH@

View File

@ -362,6 +362,7 @@ fi
#AC_PROG_INSTALL # needs install-sh or install.sh in sources #AC_PROG_INSTALL # needs install-sh or install.sh in sources
AC_CHECK_TOOLS(AR, [gar ar], :) AC_CHECK_TOOLS(AR, [gar ar], :)
AC_CHECK_PROGS(TAR, [gtar tar]) AC_CHECK_PROGS(TAR, [gtar tar])
AC_CHECK_PROGS(DIFF, [gnudiff gdiff diff])
# TCLTK_PATH will be set to some value if we want Tcl/Tk # TCLTK_PATH will be set to some value if we want Tcl/Tk
# or will be empty otherwise. # or will be empty otherwise.
if test -z "$NO_TCLTK"; then if test -z "$NO_TCLTK"; then

View File

@ -107,7 +107,7 @@ case "${1:-.}${2:-.}${3:-.}" in
# remove lines that are unique to ours. # remove lines that are unique to ours.
orig=`git-unpack-file $2` orig=`git-unpack-file $2`
sz0=`wc -c <"$orig"` sz0=`wc -c <"$orig"`
diff -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add $DIFF -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add
sz1=`wc -c <"$orig"` sz1=`wc -c <"$orig"`
# If we do not have enough common material, it is not # If we do not have enough common material, it is not