summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4b05548)
raw | patch | inline | side by side (parent: 4b05548)
author | Gary V. Vaughan <git@mlists.thewrittenword.com> | |
Fri, 14 May 2010 09:31:36 +0000 (09:31 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 31 May 2010 23:59:27 +0000 (16:59 -0700) |
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>
vendor diff to choke.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
index 2135a8ee1f4f56a8c799437949ba76d7526164c0..34d02a24188921ebac1b70f7cf0c6517a45e8fb1 100755 (executable)
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 f6085a52400a2f440cc174cdd8ab980c3c7a644d..668dbc96ca3ccefb5117155012275cc5b2fe28da 100644 (file)
--- a/Makefile
+++ b/Makefile
CC = gcc
AR = ar
RM = rm -f
+DIFF = diff
TAR = tar
FIND = find
INSTALL = install
ALL_CFLAGS += $(BASIC_CFLAGS)
ALL_LDFLAGS += $(BASIC_LDFLAGS)
-export TAR INSTALL DESTDIR SHELL_PATH
+export DIFF TAR INSTALL DESTDIR SHELL_PATH
### Build rules
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 d35f639d4c2d41c01efcef743795102c203763d1..09bd5d417db61c81ec09f75a731597d7fd6e4ed7 100644 (file)
--- a/config.mak.in
+++ b/config.mak.in
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 ad380b83d1921b9f9e1080a971a760ec4df96de3..d8aab9a27706cfb9802af60bd3cd32f7142f0107 100644 (file)
--- a/configure.ac
+++ b/configure.ac
#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 d067894bf45fd0a50513e196ea2a5e671d901681..3145009f4be40d367f52f16dc2b7edb00d153137 100755 (executable)
--- a/git-merge-one-file.sh
+++ b/git-merge-one-file.sh
# 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