git-branch: introduce missing long forms for the options

Long forms are better to memorize and more reliably uniform across commands. Names follow precedents, e.g. "git log --remotes". Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael J Gruber committed Aug 28, 2011 at 16:54 UTC 171edcbb49df30bbe96cc7f7204549df22c1beee
2 files changed +10 -5
Documentation/git-branch.txt
+5
@@ -64,6 +64,7 @@ way to clean up all obsolete remote-tracking branches.
64 OPTIONS
65 -------
66 -d::
67 +--delete::
68 Delete a branch. The branch must be fully merged in its
69 upstream branch, or in `HEAD` if no upstream was set with
70 `--track` or `--set-upstream`.
@@ -72,6 +73,7 @@ OPTIONS
73 Delete a branch irrespective of its merged status.
74
75 -l::
76 +--create-reflog::
77 Create the branch's reflog. This activates recording of
78 all changes made to the branch ref, enabling use of date
79 based sha1 expressions such as "<branchname>@\{yesterday}".
@@ -84,6 +86,7 @@ OPTIONS
86 already. Without `-f` 'git branch' refuses to change an existing branch.
87
88 -m::
89 +--move::
90 Move/rename a branch and the corresponding reflog.
91
92 -M::
@@ -100,9 +103,11 @@ OPTIONS
103 Same as `--color=never`.
104
105 -r::
106 +--remotes::
107 List or delete (if used with -d) the remote-tracking branches.
108
109 -a::
110 +--all::
111 List both remote-tracking branches and local branches.
112
113 -v::
builtin/branch.c
+5 -5
@@ -628,7 +628,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
628 OPT_SET_INT( 0, "set-upstream", &track, "change upstream info",
629 BRANCH_TRACK_OVERRIDE),
630 OPT__COLOR(&branch_use_color, "use colored output"),
631 - OPT_SET_INT('r', NULL, &kinds, "act on remote-tracking branches",
631 + OPT_SET_INT('r', "remotes", &kinds, "act on remote-tracking branches",
632 REF_REMOTE_BRANCH),
633 {
634 OPTION_CALLBACK, 0, "contains", &with_commit, "commit",
@@ -645,13 +645,13 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
645 OPT__ABBREV(&abbrev),
646
647 OPT_GROUP("Specific git-branch actions:"),
648 - OPT_SET_INT('a', NULL, &kinds, "list both remote-tracking and local branches",
648 + OPT_SET_INT('a', "all", &kinds, "list both remote-tracking and local branches",
649 REF_REMOTE_BRANCH | REF_LOCAL_BRANCH),
650 - OPT_BIT('d', NULL, &delete, "delete fully merged branch", 1),
650 + OPT_BIT('d', "delete", &delete, "delete fully merged branch", 1),
651 OPT_BIT('D', NULL, &delete, "delete branch (even if not merged)", 2),
652 - OPT_BIT('m', NULL, &rename, "move/rename a branch and its reflog", 1),
652 + OPT_BIT('m', "move", &rename, "move/rename a branch and its reflog", 1),
653 OPT_BIT('M', NULL, &rename, "move/rename a branch, even if target exists", 2),
654 - OPT_BOOLEAN('l', NULL, &reflog, "create the branch's reflog"),
654 + OPT_BOOLEAN('l', "create-reflog", &reflog, "create the branch's reflog"),
655 OPT__FORCE(&force_create, "force creation (when already exists)"),
656 {
657 OPTION_CALLBACK, 0, "no-merged", &merge_filter_ref,