Deprecate merge-recursive.py
authorJunio C Hamano <junkio@cox.net>
Mon, 25 Sep 2006 02:49:47 +0000 (19:49 -0700)
committerJunio C Hamano <junkio@cox.net>
Mon, 25 Sep 2006 03:33:35 +0000 (20:33 -0700)
This renames merge-recursive written in Python to merge-recursive-old,
and makes merge-recur as a synonym to merge-recursive.  We do not remove
merge-recur yet, but we will remove merge-recur and merge-recursive-old
in a few releases down the road.

Signed-off-by: Junio C Hamano <junkio@cox.net>
.gitignore
Makefile
configure.ac
git-merge-recursive-old.py [moved from git-merge-recursive.py with 100% similarity]
git-merge.sh
git-rebase.sh
t/test-lib.sh

index 284db5dffc6605a44b08b21a677434758c63cbe5..25eb4637a6f971a4a290ab823a937997c700bd7f 100644 (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
index 28091d6be00666b0cbfd2faaa558770c836695cd..c888c810bf8220c25b9949f47730742347738c32 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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 = \
        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 = \
        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)
 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
 
 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)
        $(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::
                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" || \
index 511cac93d6cec11f3717e810d0c80b27646a5713..b1a5833b40b905ae07b27c414833394ef63b0c99 100644 (file)
@@ -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
 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
index d049e164318a416941334b15699d52f87b00387f..5b34b4de99c33a99dfb841795baced8889f74a88 100755 (executable)
@@ -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
                        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 " ;;
index 20f74d416732e681d3b44ea610e428529af49235..a7373c0532fad447263e7199d0b8ec2908c683c9 100755 (executable)
@@ -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
        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
        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
index e75ad5faace6e40e7f6f3f47e9be90b0e9c4691e..0fe2718845fa8ad66dfa850ac2921e33b10b51c1 100755 (executable)
@@ -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 || {