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>maint
parent
b0d3e9baaa
commit
2db8aaeca1
|
@ -6,6 +6,8 @@
|
||||||
USAGE='<upstream> [<head>]'
|
USAGE='<upstream> [<head>]'
|
||||||
. git-sh-setup
|
. git-sh-setup
|
||||||
|
|
||||||
|
case $# in 1|2) ;; *) usage ;; esac
|
||||||
|
|
||||||
# Make sure we do not have .dotest
|
# Make sure we do not have .dotest
|
||||||
if mkdir .dotest
|
if mkdir .dotest
|
||||||
then
|
then
|
||||||
|
@ -37,6 +39,7 @@ esac
|
||||||
# If the branch to rebase is given, first switch to it.
|
# If the branch to rebase is given, first switch to it.
|
||||||
case "$#" in
|
case "$#" in
|
||||||
2)
|
2)
|
||||||
|
head=$(git-rev-parse --verify "$2^") || usage
|
||||||
git-checkout "$2" || usage
|
git-checkout "$2" || usage
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue