Re: [PATCH v2 3/3] show-ref: introduce --branches and deprecate --heads
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 14, 2024, 22:46 UTC
- Message-ID
- <xmqq5xubcfco.fsf@gitster.g>
- In-Reply-To
- <CABPp-BEZhR8T56bwxpi+_uGG8w7nms+7HtCR45S4oVjPom9Stg@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
> ...or maybe my argument breaks down because `HEAD` is more prominent > and tends to be used by users more (`git reset --hard HEAD`, `git > checkout HEAD~1`), and thus there's an argument it already is somewhat > aligned with user terminology?
Yeah, you are correct to say that HEAD is a lot more prominent than "refs/heads/". "git branch --list" does not expose the "refs/heads/" part (but "git for-each-ref" does), but you'd see HEAD in many places (e.g. "git show -s <RETURN>" gives the --decorate output that says "HEAD -> master" etc.).
Of course we _could_ plan to rename "HEAD" to something else, like "CURRENT" and deal with the fallout, and then rename "refs/heads/" to "refs/branches/", but for what cost to achieve what benefit? The tradeoff does not look all that good to me.
So I'd say renaming --heads to --branches would probably be a good place to stop, at least for now.