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

Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk

From
Jeff King <peff@peff.net>
Date
Feb 10, 2009, 11:19 UTC
Message-ID
<20090210111907.GD12089@coredump.intra.peff.net>
In-Reply-To
<20090210075214.GC1320@atjola.homenet>

[let me answer your email in reverse order, which will hopefully make more sense when reading]

On Tue, Feb 10, 2009 at 08:52:14AM +0100, Björn Steinbrink wrote:
> still don't really see what I'd use it for. From what I've heard, some
> people just consider origin/HEAD a clone artifact without much use, and
> so far, I think I agree. But maybe there's more to it?

The ref "origin" will resolve to "refs/remotes/origin/HEAD", if it exists. So you can use it as a shorthand for "origin/master" (or whatever branch is most interesting to you on the remote).

> If the <name>/HEAD symref would be created for all remotes and would get
> updated, that would at least make the marker more meaningful, but I

It has been noted in the past that it should _not_ be automatically updated, since it is really about "what is the user's preference for the 'most interesting' branch in this remote". And we don't want to overwrite some preference that they specified.

So I think it makes sense to:
  - if it doesn't exist, set it up based on the remote's HEAD. Clone
    already does this, but "git remote add -f" should probably do it,
    too. I'm not sure if every fetch should do it.
  - give the user some nice interface (probably via "git remote") to
    move the pointer around (right now, it is "git symbolic-ref
    refs/remotes/$remote/HEAD refs/remotes/$remote/$branch").
  - give the user some nice interface to re-fetch the remote HEAD and
    update refs/remotes/$remote/HEAD with it. Probably as an option to
    the "git remote" invocation above.
-Peff
Previous: Björn SteinbrinkNext: Björn Steinbrink
Message 12 of 16 in “builtin-branch: highlight current remote branches with an asterisk”
  1. builtin-branch: highlight current remote branches with an asteriskJay Soffian, Feb 9, 2009
  2. Johannes SchindelinFeb 9, 2009
  3. Mark BurtonFeb 10, 2009
  4. Jay SoffianFeb 10, 2009
  5. Mark BurtonFeb 10, 2009
  6. Junio C HamanoFeb 10, 2009
  7. Santi BéjarFeb 10, 2009
  8. Jay SoffianFeb 10, 2009
  9. Björn SteinbrinkFeb 10, 2009
  10. Santi BéjarFeb 10, 2009
  11. Björn SteinbrinkFeb 10, 2009
  12. Jeff KingFeb 10, 2009
  13. Björn SteinbrinkFeb 10, 2009
  14. Jeff KingFeb 10, 2009
  15. Björn SteinbrinkFeb 10, 2009
  16. Jeff KingFeb 10, 2009

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.