git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Daniels Umanovskis <daniels@umanovskis.se>, git@vger.kernel.org
Subject: Re: [PATCH 0/2] branch: introduce --current display option
Date: Wed, 10 Oct 2018 23:51:08 +0000	[thread overview]
Message-ID: <20181010235108.GW432229@genre.crustytoothpaste.net> (raw)
In-Reply-To: <xmqq8t36q1k6.fsf@gitster-ct.c.googlers.com>

[-- Attachment #1: Type: text/plain, Size: 1859 bytes --]

On Wed, Oct 10, 2018 at 05:59:05AM +0900, Junio C Hamano wrote:
> I do not offhand know if we want "show the current one only" option
> that is "command mode" sitting next to "list", "delete", "rename"
> etc., or "limit the operation to the one that is currently cheked
> out".  If we want the former, the name of the option must *NOT* be
> just "current".  Have a verb in its name to avoid it from getting
> mistaken as a botched attempt to do the latter.  Somethng like
> "--show-current", "--list-current", "--display-current", etc.

I had considered sending a patch with this option spelled "--show".
This is certainly a highly desired feature (hence my intent to send a
patch), and I think there's room for both a porcelain (this series) and
a plumbing (git rev-parse --abbrev-ref) version.

> Even if we were doing the latter (i.e. focused "this is only for
> listing/showing"), if we do not want to close the door to later
> extend the concept of "current" to the former (i.e. "--show-current"
> becomes a convenience synonym for "--list --current-only") we also
> need to think about what to do with the detached HEAD state.  When
> the concept of "current" is extended to become "usually an operation
> can work on multiple branches but we are limiting it to the current
> one", detached HEAD state is conceptually "not having any current
> branch".  We could fail the operation (i.e. you told me to distim
> the branch but there is no such branch) or make it a silent no-op
> (i.e. you told me to distim no branch, so nothing happened and there
> is no error).

What I would suggest is the same thing git status shows: "HEAD (detached
at...)".  I'll admit it isn't strictly a branch, but that's what most
people will want to see, I expect.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

  parent reply	other threads:[~2018-10-10 23:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 18:20 [PATCH 0/2] branch: introduce --current display option Daniels Umanovskis
2018-10-09 20:59 ` Junio C Hamano
2018-10-10  9:29   ` Eric Sunshine
2018-10-10  9:42     ` Eric Sunshine
2018-10-10 14:24   ` Rafael Ascensão
2018-10-10 23:51   ` brian m. carlson [this message]
2018-10-10 15:03 ` Ævar Arnfjörð Bjarmason
2018-10-10 16:29   ` Daniels Umanovskis
2018-10-10 18:08     ` Stefan Beller

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20181010235108.GW432229@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=daniels@umanovskis.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).