X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-show-branch.c;h=306b850c720ecef7030bd7139f7c7d2758125ac4;hb=6e13921b4f7adcc7316a76c0c4955b85b1589a65;hp=93047f5117796fb7556fa23871397e68e9f5e4c2;hpb=ea81e10ff4e31820407f4cb1b8ebd87de9e51737;p=git.git diff --git a/builtin-show-branch.c b/builtin-show-branch.c index 93047f511..306b850c7 100644 --- a/builtin-show-branch.c +++ b/builtin-show-branch.c @@ -4,7 +4,7 @@ #include "builtin.h" static const char show_branch_usage[] = -"git-show-branch [--sparse] [--current] [--all] [--remotes] [--topo-order] [--more=count | --list | --independent | --merge-base ] [--topics] [...] | --reflog[=n[,b]] "; +"git show-branch [--sparse] [--current] [--all] [--remotes] [--topo-order] [--more=count | --list | --independent | --merge-base ] [--topics] [...] | --reflog[=n[,b]] "; static const char show_branch_usage_reflog[] = "--reflog is incompatible with --all, --remotes, --independent or --merge-base"; @@ -259,11 +259,10 @@ static void join_revs(struct commit_list **list_p, static void show_one_commit(struct commit *commit, int no_name) { - struct strbuf pretty; + struct strbuf pretty = STRBUF_INIT; const char *pretty_str = "(unavailable)"; struct commit_name *name = commit->util; - strbuf_init(&pretty, 0); if (commit->object.parsed) { pretty_print_commit(CMIT_FMT_ONELINE, commit, &pretty, 0, NULL, NULL, 0, 0);