commit: cope with scissors lines in commit message
[gitweb.git] / builtin / commit.c
index 12afc42d197bfaffc950e7f44acb5d75517f1fc2..39cf8976e3933a3d5310098896feaf674dedc12b 100644 (file)
@@ -1672,8 +1672,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
                append_merge_tag_headers(parents, &tail);
        }
 
-       if (commit_tree_extended(&sb, active_cache_tree->sha1, parents, sha1,
-                                author_ident.buf, sign_commit, extra)) {
+       if (commit_tree_extended(sb.buf, sb.len, active_cache_tree->sha1,
+                        parents, sha1, author_ident.buf, sign_commit, extra)) {
                rollback_index_files();
                die(_("failed to write commit object"));
        }