Re: [PATCH] rebase: rebasing can also be done when HEAD is detached
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2017, 02:13 UTC
- Message-ID
- <xmqq60a3xdpw.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171121152533.3793-1-kaartic.sivaraam@gmail.com>
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
Show 15 quoted lines
> In a repository when attempting to rebase when the HEAD is detached > and it 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> > --- > In this patch, I basically assumed that there would be no > branch named "HEAD".
Perhaps time to learn "git symbolic-ref HEAD" and use it instead of depending on the name?