summaryrefslogtreecommitdiff
path: root/git-merge.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-07-09 07:42:26 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-14 06:10:19 (GMT)
commit06d30f4f3eea71bce4cf48db3ea384976b3983b7 (patch)
treef3b1d0ba712cc976dba5bc1d7d9dc5f104d81bee /git-merge.sh
parent6d297f81373e19d86b8f02cb68120201d1b0ab1d (diff)
downloadgit-06d30f4f3eea71bce4cf48db3ea384976b3983b7.zip
git-06d30f4f3eea71bce4cf48db3ea384976b3983b7.tar.gz
git-06d30f4f3eea71bce4cf48db3ea384976b3983b7.tar.bz2
recur vs recursive: help testing without touching too many stuff.
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>
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-xgit-merge.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/git-merge.sh b/git-merge.sh
index b26ca14..9b68115 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -9,8 +9,13 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>]... <merge-message> <head> <
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=
@@ -110,6 +115,10 @@ 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 " ;;