Skip to content

Commit d1b1a91

Browse files
Gary V. Vaughangitster
authored andcommitted
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>
1 parent 4b05548 commit d1b1a91

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

Documentation/install-webdoc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ do
1212
then
1313
: did not match
1414
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"
1616
then
1717
:; # up to date
1818
else

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ export prefix bindir sharedir sysconfdir
287287
CC = gcc
288288
AR = ar
289289
RM = rm -f
290+
DIFF = diff
290291
TAR = tar
291292
FIND = find
292293
INSTALL = install
@@ -1460,7 +1461,7 @@ endif
14601461
ALL_CFLAGS += $(BASIC_CFLAGS)
14611462
ALL_LDFLAGS += $(BASIC_LDFLAGS)
14621463

1463-
export TAR INSTALL DESTDIR SHELL_PATH
1464+
export DIFF TAR INSTALL DESTDIR SHELL_PATH
14641465

14651466

14661467
### Build rules
@@ -1877,6 +1878,7 @@ GIT-CFLAGS: FORCE
18771878
GIT-BUILD-OPTIONS: FORCE
18781879
@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
18791880
@echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@
1881+
@echo DIFF=\''$(subst ','\'',$(subst ','\'',$(DIFF)))'\' >>$@
18801882
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
18811883
@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
18821884
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@

config.mak.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ LDFLAGS = @LDFLAGS@
88
CC_LD_DYNPATH = @CC_LD_DYNPATH@
99
AR = @AR@
1010
TAR = @TAR@
11+
DIFF = @DIFF@
1112
#INSTALL = @INSTALL@ # needs install-sh or install.sh in sources
1213
TCLTK_PATH = @TCLTK_PATH@
1314

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ fi
362362
#AC_PROG_INSTALL # needs install-sh or install.sh in sources
363363
AC_CHECK_TOOLS(AR, [gar ar], :)
364364
AC_CHECK_PROGS(TAR, [gtar tar])
365+
AC_CHECK_PROGS(DIFF, [gnudiff gdiff diff])
365366
# TCLTK_PATH will be set to some value if we want Tcl/Tk
366367
# or will be empty otherwise.
367368
if test -z "$NO_TCLTK"; then

git-merge-one-file.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ case "${1:-.}${2:-.}${3:-.}" in
107107
# remove lines that are unique to ours.
108108
orig=`git-unpack-file $2`
109109
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
111111
sz1=`wc -c <"$orig"`
112112

113113
# If we do not have enough common material, it is not

0 commit comments

Comments
 (0)