git-sh-setup.sh: add variable to use the stuck-long mode
[gitweb.git] / git-rebase.sh
index 7185dc84387d6e20299fdda86800372445b9318e..c1f98ae5ada0e80e4639b88523951922e322b772 100755 (executable)
@@ -5,6 +5,7 @@
 
 SUBDIRECTORY_OK=Yes
 OPTIONS_KEEPDASHDASH=
+OPTIONS_STUCKLONG=
 OPTIONS_SPEC="\
 git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
 git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
@@ -534,7 +535,8 @@ esac
 
 if test "$fork_point" = t
 then
-       new_upstream=$(git merge-base --fork-point "$upstream_name" "$switch_to")
+       new_upstream=$(git merge-base --fork-point "$upstream_name" \
+                       "${switch_to:-HEAD}")
        if test -n "$new_upstream"
        then
                upstream=$new_upstream