recur vs recursive: help testing without touching too many stuff.
[gitweb.git] / git-rebase.sh
index 2a4c8c8a897e1d7f8220601892fd92514e09c65a..8c5da7219e760cd7e57b523eb626629727b1d44b 100755 (executable)
@@ -35,7 +35,13 @@ 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
-strategy=recur
+case "${GIT_USE_RECUR_FOR_RECURSIVE}" in
+'')
+       strategy=recursive ;;
+?*)
+       strategy=recur ;;
+esac
+
 do_merge=
 dotest=$GIT_DIR/.dotest-merge
 prec=4
@@ -198,6 +204,11 @@ 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
@@ -292,7 +303,7 @@ 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