Merge branch 'maint'
[gitweb.git] / builtin / commit.c
index be1ab2e2570fe0b600f8b1aa55c32573578af766..5891e95758a0d2530b325bd5fd346e15702e3017 100644 (file)
@@ -104,7 +104,7 @@ static enum commit_whence whence;
 static int use_editor = 1, include_status = 1;
 static int show_ignored_in_status;
 static const char *only_include_assumed;
-static struct strbuf message;
+static struct strbuf message = STRBUF_INIT;
 
 static int null_termination;
 static enum {
@@ -1492,7 +1492,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
                append_merge_tag_headers(parents, &tail);
        }
 
-       if (commit_tree_extended(sb.buf, active_cache_tree->sha1, parents, sha1,
+       if (commit_tree_extended(&sb, active_cache_tree->sha1, parents, sha1,
                                 author_ident.buf, extra)) {
                rollback_index_files();
                die(_("failed to write commit object"));