X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-show-branch.c;h=306b850c720ecef7030bd7139f7c7d2758125ac4;hb=6e13921b4f7adcc7316a76c0c4955b85b1589a65;hp=233eed499d0b8790781326ff0455bdc7f09fe4d4;hpb=d1f2e1696ce168b3a70b59be7c58fa96c530d4fb;p=git.git diff --git a/builtin-show-branch.c b/builtin-show-branch.c index 233eed499..306b850c7 100644 --- a/builtin-show-branch.c +++ b/builtin-show-branch.c @@ -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);