git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Junio C Hamano <gitster@pobox.com>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH 4/4] branch: add '--show-description' option
Date: Tue, 2 Jan 2018 11:39:13 +0100	[thread overview]
Message-ID: <CAM0VKjm0WMDm_AETogX7ygMgeqY28YQLJLoM+dxtkfQfnT3aww@mail.gmail.com> (raw)
In-Reply-To: <CAPig+cQ=Fj-sWrxDH1RV=PnYT01LGapzJjrRT5QdqUTkyc0rfg@mail.gmail.com>

On Tue, Jan 2, 2018 at 6:17 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> On Mon, Jan 1, 2018 at 5:54 PM, SZEDER Gábor <szeder.dev@gmail.com> wrote:

> s/exit/exist/

Thanks.

>>     query does).
>>
>> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
>> ---
>> diff --git a/builtin/branch.c b/builtin/branch.c
>> @@ -737,6 +741,35 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
>> +       } else if (show_description) {
>> +               [...]
>> +               if (!argc) {
>> +                       if (filter.detached)
>> +                               die(_("cannot show description on detached HEAD"));
>> +                       branch_name = head;
>> +               } else if (argc == 1)
>> +                       branch_name = argv[0];
>> +               else
>> +                       die(_("cannot show description of more than one branch"));
>
> Aside from paralleling the single branch accepted by
> --edit-description, why this limitation? (Just curious; I don't feel
> strongly one way or the other.)

It's not just '--edit-description', most other options won't accept
multiple branches either.  As far as I can tell only deleting branches
can deal with multiple branches in one go.

Furthermore, branch descriptions are likely more lines long, so we
can't just dump them one after the other, but we we would have to
separate the descriptions of different branches in the output.
Considering that 'git branch' mostly works only with a single branch at
a time, I didn't feel the need to do so.

Gábor

  reply	other threads:[~2018-01-02 10:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-01 22:54 [PATCH 0/4] branch: add '--show-description' option SZEDER Gábor
2018-01-01 22:54 ` [PATCH 1/4] branch: '--edit-description' is incompatible with other options SZEDER Gábor
2018-01-01 22:54 ` [PATCH 2/4] t3200: fix a misindented line SZEDER Gábor
2018-01-01 22:54 ` [PATCH 3/4] t3200: restore branch after "unborn --edit-description" test SZEDER Gábor
2018-01-01 22:54 ` [PATCH 4/4] branch: add '--show-description' option SZEDER Gábor
2018-01-02  5:17   ` Eric Sunshine
2018-01-02 10:39     ` SZEDER Gábor [this message]
2018-01-02  9:32   ` Johannes Sixt
2018-01-02 10:41     ` SZEDER Gábor
2018-01-02 19:25       ` SZEDER Gábor

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=CAM0VKjm0WMDm_AETogX7ygMgeqY28YQLJLoM+dxtkfQfnT3aww@mail.gmail.com \
    --to=szeder.dev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.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).