summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 7185dc8438..8a3efa2983 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -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