Browse Source

Merge branch 'jc/deprecate-recursive'

* jc/deprecate-recursive:
  Deprecate merge-recursive.py
maint
Junio C Hamano 18 years ago
parent
commit
e38604e006
  1. 1
      .gitignore
  2. 18
      Makefile
  3. 2
      configure.ac
  4. 0
      git-merge-recursive-old.py
  5. 16
      git-merge.sh
  6. 19
      git-rebase.sh
  7. 2
      t/test-lib.sh

1
.gitignore vendored

@ -65,6 +65,7 @@ git-merge-one-file @@ -65,6 +65,7 @@ git-merge-one-file
git-merge-ours
git-merge-recur
git-merge-recursive
git-merge-recursive-old
git-merge-resolve
git-merge-stupid
git-mktag

18
Makefile

@ -81,8 +81,6 @@ all: @@ -81,8 +81,6 @@ all:
# Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
# a missing newline at the end of the file.
#
# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
#
# Define COLLISION_CHECK below if you believe that SHA1's
# 1461501637330902918203684832716283019655932542976 hashes do not give you
# sufficient guarantee that no collisions between objects will ever happen.
@ -174,7 +172,7 @@ SCRIPT_PERL = \ @@ -174,7 +172,7 @@ SCRIPT_PERL = \
git-send-email.perl git-svn.perl

SCRIPT_PYTHON = \
git-merge-recursive.py
git-merge-recursive-old.py

SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
@ -199,7 +197,7 @@ PROGRAMS = \ @@ -199,7 +197,7 @@ PROGRAMS = \
git-upload-pack$X git-verify-pack$X \
git-pack-redundant$X git-var$X \
git-describe$X git-merge-tree$X git-blame$X git-imap-send$X \
git-merge-recur$X \
git-merge-recursive$X \
$(EXTRA_PROGRAMS)

# Empty...
@ -570,7 +568,8 @@ LIB_OBJS += $(COMPAT_OBJS) @@ -570,7 +568,8 @@ LIB_OBJS += $(COMPAT_OBJS)
export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
### Build rules

all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi
all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi \
git-merge-recur$X

all:
$(MAKE) -C templates
@ -585,6 +584,9 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS @@ -585,6 +584,9 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS

help.o: common-cmds.h

git-merge-recur$X: git-merge-recursive$X
rm -f $@ && ln git-merge-recursive$X $@

$(BUILT_INS): git$X
rm -f $@ && ln git$X $@

@ -722,11 +724,6 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS) @@ -722,11 +724,6 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)

merge-recursive.o path-list.o: path-list.h
git-merge-recur$X: merge-recursive.o path-list.o $(GITLIBS)
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS)

$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
$(DIFF_OBJS): diffcore.h
@ -887,6 +884,7 @@ check-docs:: @@ -887,6 +884,7 @@ check-docs::
case "$$v" in \
git-merge-octopus | git-merge-ours | git-merge-recursive | \
git-merge-resolve | git-merge-stupid | git-merge-recur | \
git-merge-recursive-old | \
git-ssh-pull | git-ssh-push ) continue ;; \
esac ; \
test -f "Documentation/$$v.txt" || \

2
configure.ac

@ -75,7 +75,6 @@ GIT_ARG_SET_PATH(shell) @@ -75,7 +75,6 @@ GIT_ARG_SET_PATH(shell)
# Define PERL_PATH to provide path to Perl.
GIT_ARG_SET_PATH(perl)
#
# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
# Define PYTHON_PATH to provide path to Python.
AC_ARG_WITH(python,[AS_HELP_STRING([--with-python=PATH], [provide PATH to python])
AS_HELP_STRING([--without-python], [don't use python scripts])],
@ -100,7 +99,6 @@ AC_PROG_CC @@ -100,7 +99,6 @@ AC_PROG_CC
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_PROGS(TAR, [gtar tar])
#
# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
# Define PYTHON_PATH to provide path to Python.
if test -z "$NO_PYTHON"; then
if test -z "$PYTHON_PATH"; then

0
git-merge-recursive.py → git-merge-recursive-old.py

16
git-merge.sh

@ -9,21 +9,15 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>]... <merge-message> <head> < @@ -9,21 +9,15 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>]... <merge-message> <head> <
LF='
'

all_strategies='recursive recur octopus resolve stupid ours'
case "${GIT_USE_RECUR_FOR_RECURSIVE}" in
'')
default_twohead_strategies=recursive ;;
?*)
default_twohead_strategies=recur ;;
esac
all_strategies='recur recursive recursive-old octopus resolve stupid ours'
default_twohead_strategies='recursive'
default_octopus_strategies='octopus'
no_trivial_merge_strategies='ours'
use_strategies=

index_merge=t
if test "@@NO_PYTHON@@"; then
all_strategies='recur resolve octopus stupid ours'
default_twohead_strategies='resolve'
all_strategies='recur recursive resolve octopus stupid ours'
fi

dropsave() {
@ -122,10 +116,6 @@ do @@ -122,10 +116,6 @@ do
strategy="$2"
shift ;;
esac
case "$strategy,${GIT_USE_RECUR_FOR_RECURSIVE}" in
recursive,?*)
strategy=recur ;;
esac
case " $all_strategies " in
*" $strategy "*)
use_strategies="$use_strategies$strategy " ;;

19
git-rebase.sh

@ -35,13 +35,7 @@ If you would prefer to skip this patch, instead run \"git rebase --skip\". @@ -35,13 +35,7 @@ If you would prefer to skip this patch, instead run \"git rebase --skip\".
To restore the original branch and stop rebasing run \"git rebase --abort\".
"
unset newbase
case "${GIT_USE_RECUR_FOR_RECURSIVE}" in
'')
strategy=recursive ;;
?*)
strategy=recur ;;
esac

strategy=recursive
do_merge=
dotest=$GIT_DIR/.dotest-merge
prec=4
@ -206,11 +200,6 @@ do @@ -206,11 +200,6 @@ do
shift
done

case "$strategy,${GIT_USE_RECUR_FOR_RECURSIVE}" in
recursive,?*)
strategy=recur ;;
esac

# Make sure we do not have .dotest
if test -z "$do_merge"
then
@ -303,11 +292,11 @@ then @@ -303,11 +292,11 @@ then
exit $?
fi

if test "@@NO_PYTHON@@" && test "$strategy" = "recursive"
if test "@@NO_PYTHON@@" && test "$strategy" = "recursive-old"
then
die 'The recursive merge strategy currently relies on Python,
die 'The recursive-old merge strategy is written in Python,
which this installation of git was not configured with. Please consider
a different merge strategy (e.g. octopus, resolve, stupid, ours)
a different merge strategy (e.g. recursive, resolve, or stupid)
or install Python and git with Python support.'

fi

2
t/test-lib.sh

@ -211,7 +211,7 @@ export PATH GIT_EXEC_PATH @@ -211,7 +211,7 @@ export PATH GIT_EXEC_PATH
PYTHON=`sed -e '1{
s/^#!//
q
}' ../git-merge-recursive` || {
}' ../git-merge-recursive-old` || {
error "You haven't built things yet, have you?"
}
"$PYTHON" -c 'import subprocess' 2>/dev/null || {

Loading…
Cancel
Save