summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <git@mlists.thewrittenword.com>2010-05-14 09:31:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-31 23:59:27 (GMT)
commitd1b1a919461c2f00d4e10f5ba227b13f800a6ac3 (patch)
tree9db6e71ab64e152fde0aa816272d58f9ec023971
parent4b05548fc0523744b7a1276cfa0f4aae19d6d9c9 (diff)
downloadgit-d1b1a919461c2f00d4e10f5ba227b13f800a6ac3.zip
git-d1b1a919461c2f00d4e10f5ba227b13f800a6ac3.tar.gz
git-d1b1a919461c2f00d4e10f5ba227b13f800a6ac3.tar.bz2
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>
-rwxr-xr-xDocumentation/install-webdoc.sh2
-rw-r--r--Makefile4
-rw-r--r--config.mak.in1
-rw-r--r--configure.ac1
-rwxr-xr-xgit-merge-one-file.sh2
5 files changed, 7 insertions, 3 deletions
diff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh
index 2135a8e..34d02a2 100755
--- a/Documentation/install-webdoc.sh
+++ b/Documentation/install-webdoc.sh
@@ -12,7 +12,7 @@ do
then
: did not match
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
:; # up to date
else
diff --git a/Makefile b/Makefile
index f6085a5..668dbc9 100644
--- a/Makefile
+++ b/Makefile
@@ -287,6 +287,7 @@ export prefix bindir sharedir sysconfdir
CC = gcc
AR = ar
RM = rm -f
+DIFF = diff
TAR = tar
FIND = find
INSTALL = install
@@ -1460,7 +1461,7 @@ endif
ALL_CFLAGS += $(BASIC_CFLAGS)
ALL_LDFLAGS += $(BASIC_LDFLAGS)
-export TAR INSTALL DESTDIR SHELL_PATH
+export DIFF TAR INSTALL DESTDIR SHELL_PATH
### Build rules
@@ -1877,6 +1878,7 @@ GIT-CFLAGS: FORCE
GIT-BUILD-OPTIONS: FORCE
@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
@echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@
+ @echo DIFF=\''$(subst ','\'',$(subst ','\'',$(DIFF)))'\' >>$@
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
diff --git a/config.mak.in b/config.mak.in
index d35f639..09bd5d4 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -8,6 +8,7 @@ LDFLAGS = @LDFLAGS@
CC_LD_DYNPATH = @CC_LD_DYNPATH@
AR = @AR@
TAR = @TAR@
+DIFF = @DIFF@
#INSTALL = @INSTALL@ # needs install-sh or install.sh in sources
TCLTK_PATH = @TCLTK_PATH@
diff --git a/configure.ac b/configure.ac
index ad380b8..d8aab9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -362,6 +362,7 @@ fi
#AC_PROG_INSTALL # needs install-sh or install.sh in sources
AC_CHECK_TOOLS(AR, [gar ar], :)
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
# or will be empty otherwise.
if test -z "$NO_TCLTK"; then
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index d067894..3145009 100755
--- a/git-merge-one-file.sh
+++ b/git-merge-one-file.sh
@@ -107,7 +107,7 @@ case "${1:-.}${2:-.}${3:-.}" in
# remove lines that are unique to ours.
orig=`git-unpack-file $2`
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"`
# If we do not have enough common material, it is not