* [PATCH] branch: fix usage string for specific git-branch options
@ 2015-07-17 18:17 Ralf Thielow
2015-07-17 19:16 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Ralf Thielow @ 2015-07-17 18:17 UTC (permalink / raw)
To: git; +Cc: Ralf Thielow
The usage string of git-branch shows generic options and specific
options. However, the specific options are called "actions".
Call them both options.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
builtin/branch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 1d15037..709dfc4 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -844,7 +844,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
},
OPT__ABBREV(&abbrev),
- OPT_GROUP(N_("Specific git-branch actions:")),
+ OPT_GROUP(N_("Specific git-branch options:")),
OPT_SET_INT('a', "all", &kinds, N_("list both remote-tracking and local branches"),
REF_REMOTE_BRANCH | REF_LOCAL_BRANCH),
OPT_BIT('d', "delete", &delete, N_("delete fully merged branch"), 1),
--
2.5.0.rc2.379.ga7d8b34
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] branch: fix usage string for specific git-branch options
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
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2015-07-17 19:16 UTC (permalink / raw)
To: Ralf Thielow; +Cc: git
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-17 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).