git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Elijah NewrenNext: Patrick Steinhardt
Message 21 of 22 in “Branches are branches and not heads”
  1. 0/3 Branches are branches and not headsJunio C Hamano, Jun 3, 2024
  2. 1/3 refs: call branches branchesJunio C Hamano, Jun 3, 2024
  3. Eric SunshineJun 3, 2024
  4. 2/3 ls-remote: introduce --branches and deprecate --headsJunio C Hamano, Jun 3, 2024
  5. Rubén JustoJun 3, 2024
  6. Eric SunshineJun 3, 2024
  7. Junio C HamanoJun 3, 2024
  8. 3/3 show-ref: introduce --branches and deprecate --headsJunio C Hamano, Jun 3, 2024
  9. Rubén JustoJun 3, 2024
  10. Patrick SteinhardtJun 4, 2024
  11. 0/3 Branches are branches and not headsJunio C Hamano, Jun 4, 2024
  12. 1/3 refs: call branches branchesJunio C Hamano, Jun 4, 2024
  13. 2/3 ls-remote: introduce --branches and deprecate --headsJunio C Hamano, Jun 4, 2024
  14. Patrick SteinhardtJun 6, 2024
  15. Junio C HamanoJun 6, 2024
  16. 3/3 show-ref: introduce --branches and deprecate --headsJunio C Hamano, Jun 4, 2024
  17. Elijah NewrenJun 14, 2024
  18. Junio C HamanoJun 14, 2024
  19. Elijah NewrenJun 14, 2024
  20. Elijah NewrenJun 14, 2024
  21. Junio C HamanoJun 14, 2024
  22. Patrick SteinhardtJun 6, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.