From: Junio C Hamano Date: Mon, 16 Feb 2015 23:15:46 GMT Subject: Re: Should "git log --decorate" indicate whether the HEAD is detached? Message-ID: In-Reply-To: Julien Cretel 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? > 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.