Merge branch 'maint'
[gitweb.git] / builtin / commit.c
index 626036a179e1476ee28a9f2ff32fedc5b97dc5d0..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 {
@@ -139,7 +139,7 @@ static struct option builtin_commit_options[] = {
        OPT_STRING('C', "reuse-message", &use_message, "commit", "reuse message from specified commit"),
        OPT_STRING(0, "fixup", &fixup_message, "commit", "use autosquash formatted message to fixup specified commit"),
        OPT_STRING(0, "squash", &squash_message, "commit", "use autosquash formatted message to squash specified commit"),
-       OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C-c/--amend)"),
+       OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C/-c/--amend)"),
        OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
        OPT_FILENAME('t', "template", &template_file, "use specified template file"),
        OPT_BOOL('e', "edit", &edit_flag, "force edit of commit"),
@@ -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"));