]> git.ipfire.org Git - thirdparty/git.git/blobdiff - commit.c
Merge branch 'pw/rebase-i-more-options'
[thirdparty/git.git] / commit.c
index 4ce8cb38d5efe01a51648b4187acc291f588c012..bc741e78ad7dc09eab6c7f24d56377ec1397040e 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -1316,8 +1316,8 @@ int commit_tree(const char *msg, size_t msg_len, const struct object_id *tree,
        int result;
 
        append_merge_tag_headers(parents, &tail);
-       result = commit_tree_extended(msg, msg_len, tree, parents, ret,
-                                     author, sign_commit, extra);
+       result = commit_tree_extended(msg, msg_len, tree, parents, ret, author,
+                                     NULL, sign_commit, extra);
        free_commit_extra_headers(extra);
        return result;
 }
@@ -1440,7 +1440,8 @@ N_("Warning: commit message did not conform to UTF-8.\n"
 int commit_tree_extended(const char *msg, size_t msg_len,
                         const struct object_id *tree,
                         struct commit_list *parents, struct object_id *ret,
-                        const char *author, const char *sign_commit,
+                        const char *author, const char *committer,
+                        const char *sign_commit,
                         struct commit_extra_header *extra)
 {
        int result;
@@ -1473,7 +1474,9 @@ int commit_tree_extended(const char *msg, size_t msg_len,
        if (!author)
                author = git_author_info(IDENT_STRICT);
        strbuf_addf(&buffer, "author %s\n", author);
-       strbuf_addf(&buffer, "committer %s\n", git_committer_info(IDENT_STRICT));
+       if (!committer)
+               committer = git_committer_info(IDENT_STRICT);
+       strbuf_addf(&buffer, "committer %s\n", committer);
        if (!encoding_is_utf8)
                strbuf_addf(&buffer, "encoding %s\n", git_commit_encoding);