Skip to content

Commit

Permalink
build: propagate $DIFF to scripts
Browse files Browse the repository at this point in the history
git-merge-one-file expects to run "-u" capable "diff", but using
$DIFF is not the right way to do so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jun 5, 2010
1 parent 46856f4 commit 09ce4bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,7 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
DIFF_SQ = $(subst ','\'',$(DIFF))

LIBS = $(GITLIBS) $(EXTLIBS)

Expand Down Expand Up @@ -1582,6 +1583,7 @@ define cmd_munge_script
$(RM) $@ $@+ && \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
-e 's|@@DIFF@@|$(DIFF_SQ)|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
-e $(BROKEN_PATH_FIX) \
Expand Down
2 changes: 1 addition & 1 deletion git-merge-one-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09ce4bb

Please sign in to comment.