Thread (14 messages) flat view 14 messages, 6 authors, 2016-06-15

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

From: Björn Steinbrink <hidden>
Date: 2016-06-15 22:46:08

On 2009.02.10 09:02:02 +0100, Santi Béjar wrote:
2009/2/10 Björn Steinbrink [off-list ref]:
quoted
On 2009.02.09 18:32:06 -0500, Jay Soffian wrote:
quoted
Teach git branch -{r,a} how to interpret remote HEADs and highlight the
corresponding remote branch with an asterisk, instead of showing literal
"<remote_name>/HEAD".
Hm, what's the use case for having such a marker? And since only "git
clone" sets up origin/HEAD, while "git remote add foo git://..." won't
create foo/HEAD,
git remote add -f ... would create it.
No, it won't. Only "git remote add -m <name> ..." would. And there, you
have to pass a branchname yourself, "-m HEAD" doesn't do the trick. So
there you'd have a "the branch I have selected" instead of "the branch
the remote HEAD referenced". Making it quite different from what "git
clone" does.

But actually, that looks like a bug. The docs for -m say that it should
just override what <name>/HEAD is set to, not that it should be required
to cause the <name>/HEAD creation. I'll try to look into that.
quoted
you would get that marker for origin only. Also, the
origin/HEAD symref isn't updated, so it doesn't tell you which branch
is "active" in the remote repository now, but which one was active when
you cloned the repo.
Maybe there should be a way to update it afterwards.
That may not be the default for remotes added with -m though, as
otherwise the -m option to "git remote add" would become quite
pointless.

Björn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help