commit.c: use skip_prefix() instead of starts_with()
[gitweb.git] / git-rebase.sh
index 7185dc84387d6e20299fdda86800372445b9318e..8a3efa2983d08e38d40ae8b6dcecd82b0901ffa1 100755 (executable)
@@ -534,7 +534,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