Re: Should "git log --decorate" indicate whether the HEAD is detached?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 16, 2015, 23:15 UTC
- Message-ID
- <xmqqa90d4fdp.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CACdBeKmNazMtzK4hdd7WXMPDr7HdPe+EFpyd3M-TPBAUEY+HpA@mail.gmail.com>
Julien Cretel <j.cretel@umail.ucc.ie> writes:
> As of Git 2.3.0, the output of "git log --decorate" is ambiguous as to > whether the HEAD is detached or not.
It sounds as if you are reporting some regression, but has any version of Git ever done so, or is this just a new feature that does not exist yet?
Show 14 quoted lines
> More specifically, consider the following output of "git log --decorate": > > 4d860e9 (HEAD, master, dev) Remove trailing whitespace > > Whether the HEAD is attached to master or detached, the output is the same. > Could/should "git log --decorate" be modified to provide this information? > Perhaps something along the lines of > > 4d860e9 (HEAD -> master, dev) Remove trailing whitespace > > or > > 4d860e9 (HEAD = master, dev) Remove trailing whitespace >
I personally do not see a need for such a differenciation. Why does one even need to know, and is it worth the cost of computing at the runtime?
Most of the time when I am on detached HEAD it is either a few commits behind a tip, or a few commits ahead of a tip.