X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=log-tree.c;h=cec3c061360e9d33068fdb6c2555b69cc11f6771;hb=1689c5de8730ea334535337a341db3c7a21ad002;hp=2c1f3e673ae7c9441cb171244d3fb91a8dd9fb1b;hpb=e782e12f89955dfb0be82098af3cfdd8dd0eaf80;p=git.git diff --git a/log-tree.c b/log-tree.c index 2c1f3e673..cec3c0613 100644 --- a/log-tree.c +++ b/log-tree.c @@ -252,7 +252,7 @@ void log_write_email_headers(struct rev_info *opt, const char *name, void show_log(struct rev_info *opt) { - struct strbuf msgbuf; + struct strbuf msgbuf = STRBUF_INIT; struct log_info *log = opt->loginfo; struct commit *commit = log->commit, *parent = log->parent; int abbrev = opt->diffopt.abbrev; @@ -381,7 +381,6 @@ void show_log(struct rev_info *opt) /* * And then the pretty-printed message itself */ - strbuf_init(&msgbuf, 0); if (need_8bit_cte >= 0) need_8bit_cte = has_non_ascii(opt->add_signoff); pretty_print_commit(opt->commit_format, commit, &msgbuf,