From: Junio C Hamano Date: Wed, 14 Dec 2005 11:11:37 +0000 (-0800) Subject: rebase: do not get confused in fast-forward situation. X-Git-Tag: v0.99.9n^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2db8aaeca1dca4e940829b87d1164e5b42ff49b4;p=git.git rebase: do not get confused in fast-forward situation. When switching to another branch and rebasing it in a one-go, it failed to update the variable that holds the branch head, and did not detect fast-forward situation correctly. Signed-off-by: Junio C Hamano --- diff --git a/git-rebase.sh b/git-rebase.sh index 8a5f44aa5..c1619ff14 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -6,6 +6,8 @@ USAGE=' []' . git-sh-setup +case $# in 1|2) ;; *) usage ;; esac + # Make sure we do not have .dotest if mkdir .dotest then @@ -37,6 +39,7 @@ esac # If the branch to rebase is given, first switch to it. case "$#" in 2) + head=$(git-rev-parse --verify "$2^") || usage git-checkout "$2" || usage esac