contrib: add 'git difftool' for launching common merge tools
[git.git] / builtin-show-branch.c
index 233eed499d0b8790781326ff0455bdc7f09fe4d4..306b850c720ecef7030bd7139f7c7d2758125ac4 100644 (file)
@@ -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);