Code

utf8.c: remove print_wrapped_text()
[git.git] / builtin-show-branch.c
index 5d85ab0cae9029f9324fca9a9923e8b61b751607..9f13caa76d3b147993b2cf39397d2f5761cfca22 100644 (file)
@@ -6,8 +6,8 @@
 #include "parse-options.h"
 
 static const char* show_branch_usage[] = {
-    "git show-branch [--sparse] [--current] [--all] [--remotes] [--topo-order] [--more=count | --list | --independent | --merge-base] [--topics] [--color] [<refs>...]",
-    "--reflog[=n[,b]] [--list] [--color] <branch>",
+    "git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [<rev> | <glob>]...",
+    "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]",
     NULL
 };
 
@@ -293,8 +293,8 @@ static void show_one_commit(struct commit *commit, int no_name)
        struct commit_name *name = commit->util;
 
        if (commit->object.parsed) {
-               pretty_print_commit(CMIT_FMT_ONELINE, commit,
-                                   &pretty, 0, NULL, NULL, 0, 0);
+               struct pretty_print_context ctx = {0};
+               pretty_print_commit(CMIT_FMT_ONELINE, commit, &pretty, &ctx);
                pretty_str = pretty.buf;
        }
        if (!prefixcmp(pretty_str, "[PATCH] "))
@@ -665,8 +665,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                            "color '*!+-' corresponding to the branch"),
                { OPTION_INTEGER, 0, "more", &extra, "n",
                            "show <n> more commits after the common ancestor",
-                           PARSE_OPT_OPTARG | PARSE_OPT_LASTARG_DEFAULT,
-                           NULL, (intptr_t)1 },
+                           PARSE_OPT_OPTARG, NULL, (intptr_t)1 },
                OPT_SET_INT(0, "list", &extra, "synonym to more=-1", -1),
                OPT_BOOLEAN(0, "no-name", &no_name, "suppress naming strings"),
                OPT_BOOLEAN(0, "current", &with_current_branch,
@@ -674,7 +673,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                OPT_BOOLEAN(0, "sha1-name", &sha1_name,
                            "name commits with their object names"),
                OPT_BOOLEAN(0, "merge-base", &merge_base,
-                           "act like git merge-base -a"),
+                           "show possible merge bases"),
                OPT_BOOLEAN(0, "independent", &independent,
                            "show refs unreachable from any other ref"),
                OPT_BOOLEAN(0, "topo-order", &lifo,
@@ -705,7 +704,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                av = default_arg;
        }
 
-       ac = parse_options(ac, av, builtin_show_branch_options,
+       ac = parse_options(ac, av, prefix, builtin_show_branch_options,
                           show_branch_usage, PARSE_OPT_STOP_AT_NON_OPTION);
        if (all_heads)
                all_remotes = 1;