Re: Notation for current branch?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 29, 2016, 19:49 UTC
- Message-ID
- <xmqqy43f9wzh.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CA+P7+xrGh687cYHJmYyXiWfjg_8i2-31FZOvk4bEMsO1FU22WA@mail.gmail.com>
Jacob Keller <jacob.keller@gmail.com> writes:
>> What's wrong with simply using 'HEAD' for scripting? > > When you want to display the current branch to the user, e.g. when > scripting a shell prompt or similar use
Wait. Even if a hypothetical version of Git understood @@ as "the current branch", how would you use that notation, instead of HEAD, to decide what to "display the current branch to the user"?
You obviously will not be doing
echo @@
You would be doing something around "git symbolic-ref" at the very least, and wouldn't you be feeding HEAD to that symbolic-ref anyway while doing so?