git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: "Santi Béjar" <santi@agolina.net>
Cc: Jay Soffian <jaysoffian@gmail.com>,
	git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Date: Tue, 10 Feb 2009 09:24:39 +0100	[thread overview]
Message-ID: <20090210082439.GD1320@atjola.homenet> (raw)
In-Reply-To: <adf1fd3d0902100002k5d787e2ewe9012b42f943a6a3@mail.gmail.com>

On 2009.02.10 09:02:02 +0100, Santi Béjar wrote:
> 2009/2/10 Björn Steinbrink <B.Steinbrink@gmx.de>:
> > On 2009.02.09 18:32:06 -0500, Jay Soffian wrote:
> >> 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.

> > 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

  reply	other threads:[~2009-02-10  8:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09 23:32 [PATCH] builtin-branch: highlight current remote branches with an asterisk Jay Soffian
2009-02-09 23:49 ` Johannes Schindelin
2009-02-10  0:03   ` Mark Burton
2009-02-10  0:22     ` Jay Soffian
2009-02-10 11:05       ` Mark Burton
2009-02-10  0:24     ` Junio C Hamano
2009-02-10  7:59       ` Santi Béjar
2009-02-10  0:10   ` Jay Soffian
2009-02-10  7:52 ` Björn Steinbrink
2009-02-10  8:02   ` Santi Béjar
2009-02-10  8:24     ` Björn Steinbrink [this message]
2009-02-10 11:19   ` Jeff King
2009-02-10 11:50     ` Björn Steinbrink
2009-02-10 11:59       ` Jeff King
2009-02-10 12:23         ` Björn Steinbrink
2009-02-10 13:04           ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090210082439.GD1320@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=santi@agolina.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).