All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH 4/4] Show the branch type after the branch name for remotes
Date: Fri, 3 Nov 2006 09:33:40 +0100	[thread overview]
Message-ID: <200611030833.42596.andyparkins@gmail.com> (raw)
In-Reply-To: <7vy7qtl0bk.fsf@assigned-by-dhcp.cox.net>

On Friday 2006 November 03 02:40, Junio C Hamano wrote:
> Andy Parkins <andyparkins@gmail.com> writes:
> > Instead of prefixing the remote branches with "remotes/" suffix them with
> > "[read only]"
>
> This is a change in UI and while I understand why you want to
> say r/o instead of remotes/, I think this needs a bit more
> thought and discussion.  People should not be feeding the output
> of "git branch" Porcelainish to their scripts, but you'll never
> know...

I intentionally made this patch in such a way as to leave the original form 
available.  I haven't added a switch to show the original form, but it's 
there if it's needed.

The reason I thought it would be acceptable is that the output changed fairly 
significantly when git-branch went builtin.

Here's the original and my "git-branch -r" run on my git repository
$ git-branch -r
remotes/up/maint
remotes/up/master
remotes/up/next
remotes/up/pu
$ ./git-branch -r
  momentum/master
  up/maint
  up/master
  up/next
  up/pu

I've not touched the "-r" path, so this is the same as the unpatched builtin 
branch.  The "remotes/" prefix is removed in refs.c by for_each_remote_ref() 
with do_for_each_ref("refs/remotes/", fn, 13, cb_data); and the spaces are 
added because print_ref_list() has only one printing path and that always 
includes spaces.

For me personally, I find my git-branch output more useful because in it's 
unswitched form it shows me all branches.  However, I can easily put this 
behaviour under a switch or, and this would get my vote, put the original 
behaviour (i.e. show local branches only) under a switch.

Which would you like?  If any.

> By the way, does "git branch -r" (without any of your patches)
> even say "remotes/"?

I haven't touched the "-r" path, so that output should be unaffected.  As 
mentioned above, git-branch.sh did include "remotes/", new builtin branch 
does not, but does include "  " at the beginning of every line.


Andy

-- 
Dr Andy Parkins, M Eng (hons), MIEE

  reply	other threads:[~2006-11-03  8:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bec6ab7849e3fcacac23cca44a0ba93282af5fca.1162465753.git.andyparkins@gmail.com>
2006-11-02 11:11 ` [PATCH 2/4] Rename remote_only to display_mode Andy Parkins
2006-11-03  2:40   ` Junio C Hamano
2006-11-03  8:40     ` Andy Parkins
2006-11-03 10:51       ` Andreas Ericsson
2006-11-03 11:51         ` Junio C Hamano
2006-11-03 12:37           ` Andy Parkins
2006-11-03 12:00         ` Andy Parkins
2006-11-03 13:23           ` Andreas Ericsson
2006-11-03 10:52     ` [PATCH] Add support to git-branch to show local and remote branches Andy Parkins
2006-11-03 12:06       ` [PATCH] Colourise git-branch output Andy Parkins
2006-11-03 19:25         ` Junio C Hamano
2006-11-03 23:05           ` Alex Riesen
2006-11-03 12:08       ` [PATCH] Add support to git-branch to show local and remote branches Junio C Hamano
2006-11-03 12:40         ` Andy Parkins
2006-11-03 19:19           ` Junio C Hamano
2006-11-02 11:11 ` [PATCH 3/4] Default to displaying /all/ non-tag refs, not just locals Andy Parkins
2006-11-03  2:40   ` Junio C Hamano
2006-11-03  8:47     ` Andy Parkins
2006-11-03 10:55       ` Andreas Ericsson
2006-11-02 11:11 ` [PATCH 4/4] Show the branch type after the branch name for remotes Andy Parkins
2006-11-03  2:40   ` Junio C Hamano
2006-11-03  8:33     ` Andy Parkins [this message]
2006-11-03 20:08       ` Junio C Hamano

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=200611030833.42596.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.