rebase: allow "-" short-hand for the previous branch
Teach rebase the same shorthand as checkout and merge to name the branch to rebase the current branch on; that is, that "-" means "the branch we were previously on". Requested-by: Tim Chase <git@tim.thechases.com> Signed-off-by: Brian Gesiak <modocache@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5f95c9f850
commit
4f4074077f
@ -449,6 +449,10 @@ then
|
||||
test "$fork_point" = auto && fork_point=t
|
||||
;;
|
||||
*) upstream_name="$1"
|
||||
if test "$upstream_name" = "-"
|
||||
then
|
||||
upstream_name="@{-1}"
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user