From: Junio C Hamano <gitster@pobox.com>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] builtin-branch: improve output when displaying remote branches
Date: Wed, 11 Feb 2009 21:42:13 -0800 [thread overview]
Message-ID: <7vhc30qki2.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <76718490902112030x46bddd84r561705a6b4f9d4b4@mail.gmail.com> (Jay Soffian's message of "Wed, 11 Feb 2009 23:30:52 -0500")
Jay Soffian <jaysoffian@gmail.com> writes:
> On Wed, Feb 11, 2009 at 10:49 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Jay Soffian <jaysoffian@gmail.com> writes:
>>
>>> $ git branch -rv
>>> origin/HEAD -> master
>>> origin/html 6116912 Autogenerated HTML docs for v1.6.2-rc0-10-gf6b9
>>
>> Doesn't the misalignment between the above two bother you?
>
> This comment makes me sad. In fact, a previous iteration looked like this:
>
> $ git branch -rv
> origin/HEAD -> master
> origin/html 6116912 Autogenerated HTML docs for v1.6.2-rc0-10-gf6b9
> origin/maint 7e1100e gitweb: add $prevent_xss option to prevent XSS
> by repository content
> origin/man 67cb1a7 Autogenerated manpages for v1.6.2-rc0-10-gf6b9
> origin/master f6b98e4 git-web--browse: Fix check for /bin/start
> origin/next 417ce12 Merge branch 'master' into next
> origin/pu 9d798e7 Merge branch 'db/foreign-scm' into pu
> origin/todo 5ed7079 What's in update
>
> IOW, align based on the width of the branch name, completely ignoring
> the width of " -> ...". But I found that ugly. It was actually more
> work to get it the way it is.
Wouldn't something like this easier to read?
> origin/HEAD ------> master
> origin/html 6116912 Autogenerated HTML docs for v1.6.2-rc0-10-gf6b9
> origin/maint 7e1100e gitweb: add $prevent_xss option to prevent XSS
I am not sure about the long arrow. It may be easier to use "->" aligned
th the right end, but that now falls into bikeshedding, so I'll leve that
to the list.
>> It can become something like:
>>
>> if (newitem->kind == REF_REMOTE_BRANCH)
>> newitem->dest = resolve_remote_symref(refname - 13);
>> else
>> newitem->dest = NULL;
>> if (newitem->dest)
>> ...
>>
>> no?
>
> Yes indeed.
Another thing you may want to consider is to introduce another variable
"name" that is supposed to be the human readable part (i.e. refname-13
etc.) and leave the refname the full name starting from "refs/". The code
to add and then subtract to go back and forth made my head spin when I
read it.
next prev parent reply other threads:[~2009-02-12 5:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 11:01 [PATCH] builtin-branch: improve output when displaying remote branches Jay Soffian
2009-02-11 6:47 ` Jay Soffian
2009-02-12 3:49 ` Junio C Hamano
2009-02-12 4:30 ` Jay Soffian
2009-02-12 5:42 ` Junio C Hamano [this message]
2009-02-13 5:34 ` [PATCH v2] " Jay Soffian
2009-02-13 6:35 ` Junio C Hamano
2009-02-13 6:45 ` Jay Soffian
2009-02-13 7:52 ` Junio C Hamano
2009-02-13 8:06 ` Jay Soffian
2009-02-13 9:40 ` [PATCH v3] " Jay Soffian
2009-02-13 6:47 ` [PATCH v2] " martin f krafft
2009-02-13 7:36 ` Junio C Hamano
2009-02-13 7:37 ` Johannes Sixt
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=7vhc30qki2.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jaysoffian@gmail.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).