From: "Santi Béjar" <santi@agolina.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mark Burton <markb@ordern.com>, git@vger.kernel.org
Subject: Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Date: Tue, 10 Feb 2009 08:59:57 +0100 [thread overview]
Message-ID: <adf1fd3d0902092359o43427e89j2005e3653766723f@mail.gmail.com> (raw)
In-Reply-To: <7viqnjrveb.fsf@gitster.siamese.dyndns.org>
2009/2/10 Junio C Hamano <gitster@pobox.com>:
> Mark Burton <markb@ordern.com> writes:
>
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>>> Let's hope that nobody's scripts rely on a single star in front of the
>>> local HEAD...
>>
>> I don't know if I have any scripts that rely on a single star in front of
>> the local HEAD or not (I'm sure some people must have them), but I do
>> think this new feature would be very confusing, especially when used
>> with -a.
>
> People use "git branch | sed -ne 's/^\* //p' in their scripts (you can say
> "against recommendation" but I think it is a sign that the recommendation
> against use of Porcelain in the scripts is not loud enough). I do not
> think anybody greps in "git branch -a", though, for that purpose.
>
> The current "branch -a" output is a mess. It omits "remotes/" even though
> it includes the local ones in the output. Perhaps with remotes/, the
> output may become a bit more readable:
>
> $ git branch -a
> * master
> next
> pu
> * remotes/dscho/master
> * remotes/origin/master
> remotes/origin/next
> remotes/origin/pu
> * remotes/spearce/master
>
> which may still be too loud with asterisks, but at least there is no
> confusion. Or perhaps like this:
>
> $ git branch -a
> * master
> next
> pu
> remotes/dscho/HEAD -> master
> remotes/dscho/master
> remotes/origin/HEAD -> master
> remotes/origin/master
> remotes/origin/next
> remotes/origin/pu
> remotes/spearce/HEAD -> master
> remotes/spearce/master
>
> with an obvious twist when there is no mixed output:
>
> $ git branch -r
> dscho/HEAD -> master
> dscho/master
> origin/HEAD -> master
> origin/master
> origin/next
> origin/pu
> spearce/HEAD -> master
> spearce/master
For me it makes sense.
Also this type of output for symrefs "-> master" makes even more sense
in the verbose output.
Santi
next prev parent reply other threads:[~2009-02-10 8:01 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 [this message]
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
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=adf1fd3d0902092359o43427e89j2005e3653766723f@mail.gmail.com \
--to=santi@agolina.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=markb@ordern.com \
/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).