Deprecate merge-recursive.py
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>
Junio C Hamano committed
Sep 24, 2006 at 19:49 UTC
a06f678eb998862ea83b73e46ece32f99132935b
7 files changed
+17
-41
.gitignore
+1
@@ -65,6 +65,7 @@ git-merge-one-file
65
git-merge-ours
66
git-merge-recur
67
git-merge-recursive
68
+git-merge-recursive-old
69
git-merge-resolve
70
git-merge-stupid
71
git-mktag
Makefile
+8
-10
@@ -81,8 +81,6 @@ all:
81
# Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
82
# a missing newline at the end of the file.
83
#
84
-# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
85
-#
84
# Define COLLISION_CHECK below if you believe that SHA1's
85
# 1461501637330902918203684832716283019655932542976 hashes do not give you
86
# sufficient guarantee that no collisions between objects will ever happen.
@@ -174,7 +172,7 @@ SCRIPT_PERL = \
172
git-send-email.perl git-svn.perl
173
174
SCRIPT_PYTHON = \
177
- git-merge-recursive.py
175
+ git-merge-recursive-old.py
176
177
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
178
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
@@ -199,7 +197,7 @@ PROGRAMS = \
197
git-upload-pack$X git-verify-pack$X \
198
git-pack-redundant$X git-var$X \
199
git-describe$X git-merge-tree$X git-blame$X git-imap-send$X \
202
- git-merge-recur$X \
200
+ git-merge-recursive$X \
201
$(EXTRA_PROGRAMS)
202
203
# Empty...
@@ -570,7 +568,8 @@ LIB_OBJS += $(COMPAT_OBJS)
568
export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
569
### Build rules
570
573
-all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi
571
+all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi \
572
+ git-merge-recur$X
573
574
all:
575
$(MAKE) -C templates
@@ -585,6 +584,9 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS
584
585
help.o: common-cmds.h
586
587
+git-merge-recur$X: git-merge-recursive$X
588
+ rm -f $@ && ln git-merge-recursive$X $@
589
+
590
$(BUILT_INS): git$X
591
rm -f $@ && ln git$X $@
592
@@ -722,11 +724,6 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
724
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
725
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
726
725
-merge-recursive.o path-list.o: path-list.h
726
-git-merge-recur$X: merge-recursive.o path-list.o $(GITLIBS)
727
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
728
- $(LIBS)
729
-
727
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
728
$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
729
$(DIFF_OBJS): diffcore.h
@@ -887,6 +884,7 @@ check-docs::
884
case "$$v" in \
885
git-merge-octopus | git-merge-ours | git-merge-recursive | \
886
git-merge-resolve | git-merge-stupid | git-merge-recur | \
887
+ git-merge-recursive-old | \
888
git-ssh-pull | git-ssh-push ) continue ;; \
889
esac ; \
890
test -f "Documentation/$$v.txt" || \
configure.ac
-2
@@ -75,7 +75,6 @@ GIT_ARG_SET_PATH(shell)
75
# Define PERL_PATH to provide path to Perl.
76
GIT_ARG_SET_PATH(perl)
77
#
78
-# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
78
# Define PYTHON_PATH to provide path to Python.
79
AC_ARG_WITH(python,[AS_HELP_STRING([--with-python=PATH], [provide PATH to python])
80
AS_HELP_STRING([--without-python], [don't use python scripts])],
@@ -100,7 +99,6 @@ AC_PROG_CC
99
AC_CHECK_TOOL(AR, ar, :)
100
AC_CHECK_PROGS(TAR, [gtar tar])
101
#
103
-# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
102
# Define PYTHON_PATH to provide path to Python.
103
if test -z "$NO_PYTHON"; then
104
if test -z "$PYTHON_PATH"; then
git-merge-recursive-old.py
renamed
git-merge.sh
+3
-13
@@ -9,21 +9,15 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>]... <merge-message> <head> <
9
LF='
10
'
11
12
-all_strategies='recursive recur octopus resolve stupid ours'
13
-case "${GIT_USE_RECUR_FOR_RECURSIVE}" in
14
-'')
15
- default_twohead_strategies=recursive ;;
16
-?*)
17
- default_twohead_strategies=recur ;;
18
-esac
12
+all_strategies='recur recursive recursive-old octopus resolve stupid ours'
13
+default_twohead_strategies='recursive'
14
default_octopus_strategies='octopus'
15
no_trivial_merge_strategies='ours'
16
use_strategies=
17
18
index_merge=t
19
if test "@@NO_PYTHON@@"; then
25
- all_strategies='recur resolve octopus stupid ours'
26
- default_twohead_strategies='resolve'
20
+ all_strategies='recur recursive resolve octopus stupid ours'
21
fi
22
23
dropsave() {
@@ -122,10 +116,6 @@ do
116
strategy="$2"
117
shift ;;
118
esac
125
- case "$strategy,${GIT_USE_RECUR_FOR_RECURSIVE}" in
126
- recursive,?*)
127
- strategy=recur ;;
128
- esac
119
case " $all_strategies " in
120
*" $strategy "*)
121
use_strategies="$use_strategies$strategy " ;;
git-rebase.sh
+4
-15
@@ -35,13 +35,7 @@ If you would prefer to skip this patch, instead run \"git rebase --skip\".
35
To restore the original branch and stop rebasing run \"git rebase --abort\".
36
"
37
unset newbase
38
-case "${GIT_USE_RECUR_FOR_RECURSIVE}" in
39
-'')
40
- strategy=recursive ;;
41
-?*)
42
- strategy=recur ;;
43
-esac
44
-
38
+strategy=recursive
39
do_merge=
40
dotest=$GIT_DIR/.dotest-merge
41
prec=4
@@ -206,11 +200,6 @@ do
200
shift
201
done
202
209
-case "$strategy,${GIT_USE_RECUR_FOR_RECURSIVE}" in
210
-recursive,?*)
211
- strategy=recur ;;
212
-esac
213
-
203
# Make sure we do not have .dotest
204
if test -z "$do_merge"
205
then
@@ -303,11 +292,11 @@ then
292
exit $?
293
fi
294
306
-if test "@@NO_PYTHON@@" && test "$strategy" = "recursive"
295
+if test "@@NO_PYTHON@@" && test "$strategy" = "recursive-old"
296
then
308
- die 'The recursive merge strategy currently relies on Python,
297
+ die 'The recursive-old merge strategy is written in Python,
298
which this installation of git was not configured with. Please consider
310
-a different merge strategy (e.g. octopus, resolve, stupid, ours)
299
+a different merge strategy (e.g. recursive, resolve, or stupid)
300
or install Python and git with Python support.'
301
302
fi
t/test-lib.sh
+1
-1
@@ -211,7 +211,7 @@ export PATH GIT_EXEC_PATH
211
PYTHON=`sed -e '1{
212
s/^#!//
213
q
214
-}' ../git-merge-recursive` || {
214
+}' ../git-merge-recursive-old` || {
215
error "You haven't built things yet, have you?"
216
}
217
"$PYTHON" -c 'import subprocess' 2>/dev/null || {