pack-objects: don't leak pack window reference when splitting packs
[gitweb.git] / builtin-rev-list.c
index c023003b2bb6402f2e8d68c00b9e3a675c0065cd..06cdeb7ebe7468911a7bee670bf5ec539185ba54 100644 (file)
@@ -107,8 +107,7 @@ static void show_commit(struct commit *commit)
                putchar('\n');
 
        if (revs.verbose_header && commit->buffer) {
-               struct strbuf buf;
-               strbuf_init(&buf, 0);
+               struct strbuf buf = STRBUF_INIT;
                pretty_print_commit(revs.commit_format, commit,
                                    &buf, revs.abbrev, NULL, NULL,
                                    revs.date_mode, 0);
@@ -178,7 +177,7 @@ static void finish_object(struct object_array_entry *p)
 static void show_object(struct object_array_entry *p)
 {
        /* An object with name "foo\n0000000..." can be used to
-        * confuse downstream git-pack-objects very badly.
+        * confuse downstream "git pack-objects" very badly.
         */
        const char *ep = strchr(p->name, '\n');