git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ralf Thielow <ralf.thielow@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] branch: fix usage string for specific git-branch options
Date: Fri, 17 Jul 2015 12:16:19 -0700	[thread overview]
Message-ID: <xmqqsi8m1toc.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1437157020-16672-1-git-send-email-ralf.thielow@gmail.com> (Ralf Thielow's message of "Fri, 17 Jul 2015 20:17:00 +0200")

Ralf Thielow <ralf.thielow@gmail.com> writes:

> The usage string of git-branch shows generic options and specific
> options. However, the specific options are called "actions".
> Call them both options.

I think this is a valid problem to address, but I do not know if the
proposed solution is the right one.

Originally, the word "action" there really meant to mean "action".
"git branch" can "list" existing ones, "create" new ones, "delete"
existing ones, "edit" upstream info or description for, etc.  These
are distinct actions.

For a single "action", there are various ways to perform it.
Different ways to affect "list", for example, are like "choosing
which ones are listed", "deciding if the output is colored", etc..
The "options" section was meant to cover these modifiers.

I think the real issues may be coming from one or both of the two:

 (1) some are grossly miscategorized.  "--all" is not an action.  It
     just affects how "listing" works.  "--no-merged" and "--merged"
     are the same way and should sit next to "--contains".

     "--set-upstream" and "--unset-upstream" on the other hand are
     not modifiers for some other actions, but are their own actions.

 (2) "Generic options" would need to show things like "-v/-q/-f"
     that would want to consistently apply to any action that you
     might want to invoke.  Because not all modifiers apply to all
     actions, there is no good place to put things like "-t" (that
     has no meaning when you are invoking "delete" action) that are
     specific to only a subset of available actions, i.e. "Not
     generic" ones.

So the real way forward would be probably to do three things.

 * Keep the same two categorization as we have, i.e. "generic
   options" and "specific actions";

 * Move the miscategorized non-actions to "generic options" section;

 * Move action-specific modifiers out of "generic options" and
   clearly state what action they work with to modify the behaviour
   of the action.

      reply	other threads:[~2015-07-17 19:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 18:17 [PATCH] branch: fix usage string for specific git-branch options Ralf Thielow
2015-07-17 19:16 ` Junio C Hamano [this message]

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=xmqqsi8m1toc.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ralf.thielow@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).