@matheusbsbs / matheus-bagliano / commits / 2db8aaeca1
Fork 0

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 <junkio@cox.net>

Junio C Hamano committed Dec 14, 2005 at 03:11 UTC 2db8aaeca1dca4e940829b87d1164e5b42ff49b4
1 file changed +3
git-rebase.sh
+3
@@ -6,6 +6,8 @@
6 USAGE='<upstream> [<head>]'
7 . git-sh-setup
8
9 +case $# in 1|2) ;; *) usage ;; esac
10 +
11 # Make sure we do not have .dotest
12 if mkdir .dotest
13 then
@@ -37,6 +39,7 @@ esac
39 # If the branch to rebase is given, first switch to it.
40 case "$#" in
41 2)
42 + head=$(git-rev-parse --verify "$2^") || usage
43 git-checkout "$2" || usage
44 esac
45