git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Vincent van Ravesteijn <vfr@lyx.org>
Cc: "Kenta Murata (村田 賢太)" <mrkn@cookpad.com>, git@vger.kernel.org
Subject: Re: [PATCH] Introduce --current option to git-branch builtin command.
Date: Thu, 07 Jun 2012 10:11:47 -0700	[thread overview]
Message-ID: <7v4nqnjbcc.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4FD069A5.1040905@lyx.org> (Vincent van Ravesteijn's message of "Thu, 07 Jun 2012 10:43:17 +0200")

Vincent van Ravesteijn <vfr@lyx.org> writes:

> git-branch has four modes: 'list', 'create', 'delete', and
> rename'. Isn't --current then just another option to the 'list'-mode?

That is how I would look at it.  We can think of various ways that
"list" can be filtered, and matching by name is one that we have an
implementation for.  "Current-only" could be another one.

> If '--current' implies the 'list'-mode, it would use
> print_ref_list'. There already is code in print_ref_list to detect
> whether a branch is the current one, it outputs the branch list in a
> formatted way, it takes care of 'columns', so wouldn't it be better to
> modify that code to only print the current branch ?

Exactly.

  reply	other threads:[~2012-06-07 17:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07  7:23 [PATCH] Introduce --current option to git-branch builtin command Kenta Murata (村田 賢太)
2012-06-07  8:43 ` Vincent van Ravesteijn
2012-06-07 17:11   ` Junio C Hamano [this message]
2012-06-07 11:18 ` konglu
2012-06-07 11:23 ` Nguyen Thai Ngoc Duy

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=7v4nqnjbcc.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mrkn@cookpad.com \
    --cc=vfr@lyx.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 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).