rebase: rebasing can also be done when HEAD is detached
commit08e66700dff55640d4698c081ab3732528563396
authorKaartic Sivaraam <kaartic.sivaraam@gmail.com>
Sat, 16 Dec 2017 09:03:19 +0000 (16 14:33 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Dec 2017 18:02:47 +0000 (19 10:02 -0800)
tree591ea24c6aa729794864ed8baa791bc5cb0bbc0f
parentca7de7b12a13c4531485788b07259a2e241f8159
rebase: rebasing can also be done when HEAD is detached

Attempting to rebase when the HEAD is detached and is already
up to date with upstream (so there's nothing to do), the
following message is shown

        Current branch HEAD is up to date.

which is clearly wrong as HEAD is not a branch.

Handle the special case of HEAD correctly to give a more precise
error message.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh