summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d297f8)
raw | patch | inline | side by side (parent: 6d297f8)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 9 Jul 2006 07:42:26 +0000 (00:42 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 14 Jul 2006 06:10:19 +0000 (23:10 -0700) |
During git-merge-recur development, you could set an environment
variable GIT_USE_RECUR_FOR_RECURSIVE to use WIP recur in place
of the recursive strategy.
Signed-off-by: Junio C Hamano <junkio@cox.net>
variable GIT_USE_RECUR_FOR_RECURSIVE to use WIP recur in place
of the recursive strategy.
Signed-off-by: Junio C Hamano <junkio@cox.net>
TEST | patch | blob | history | |
git-merge.sh | patch | blob | history | |
git-rebase.sh | patch | blob | history | |
t/t3402-rebase-merge.sh | patch | blob | history |
index d5309834740ffc056606bf2a2c971731ecb0ee4a..7286e2a546ffd77524f4a0e40eed3a9ec7e37e78 100755 (executable)
--- a/TEST
+++ b/TEST
#!/bin/sh -x
+
cd t || exit
-./t3400-rebase.sh "$@" && \
-./t6020-merge-df.sh "$@" && \
-./t3401-rebase-partial.sh "$@" && \
-./t6021-merge-criss-cross.sh "$@" && \
-./t3402-rebase-merge.sh "$@" && \
-./t6022-merge-rename.sh "$@" && \
-./t6010-merge-base.sh "$@" && \
+GIT_USE_RECUR_FOR_RECURSIVE=LetsTryIt
+export GIT_USE_RECUR_FOR_RECURSIVE
+
+./t3400-rebase.sh "$@" &&
+./t6020-merge-df.sh "$@" &&
+./t3401-rebase-partial.sh "$@" &&
+./t6021-merge-criss-cross.sh "$@" &&
+./t3402-rebase-merge.sh "$@" &&
+./t6022-merge-rename.sh "$@" &&
+./t6010-merge-base.sh "$@" &&
:
diff --git a/git-merge.sh b/git-merge.sh
index b26ca147c084c963d03effd2462244635f10e1fa..9b681159dcd5e1e22886d101306e496528cb60a4 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
LF='
'
-all_strategies='recur recur octopus resolve stupid ours'
-default_twohead_strategies='recur'
+all_strategies='recursive recur octopus resolve stupid ours'
+case "${GIT_USE_RECUR_FOR_RECURSIVE}" in
+'')
+ default_twohead_strategies=recursive ;;
+?*)
+ default_twohead_strategies=recur ;;
+esac
default_octopus_strategies='octopus'
no_trivial_merge_strategies='ours'
use_strategies=
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 " ;;
diff --git a/git-rebase.sh b/git-rebase.sh
index 2a4c8c8a897e1d7f8220601892fd92514e09c65a..8c5da7219e760cd7e57b523eb626629727b1d44b 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
To restore the original branch and stop rebasing run \"git rebase --abort\".
"
unset newbase
-strategy=recur
+case "${GIT_USE_RECUR_FOR_RECURSIVE}" in
+'')
+ strategy=recursive ;;
+?*)
+ strategy=recur ;;
+esac
+
do_merge=
dotest=$GIT_DIR/.dotest-merge
prec=4
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
exit $?
fi
-if test "@@NO_PYTHON@@" && test "$strategy" = "recur"
+if test "@@NO_PYTHON@@" && test "$strategy" = "recursive"
then
die 'The recursive merge strategy currently relies on Python,
which this installation of git was not configured with. Please consider
index b70e177ddd75ca19c3be2698cb1a998b1bf85759..d34c6cf6f3143bac81b69f79329d2d893e379c39 100755 (executable)
--- a/t/t3402-rebase-merge.sh
+++ b/t/t3402-rebase-merge.sh
'
test_expect_success 'reference merge' '
- git merge -s recur "reference merge" HEAD master
+ git merge -s recursive "reference merge" HEAD master
'
test_expect_success rebase '