summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-03 19:37:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-03 19:37:01 (GMT)
commit9c31b19dd00981fcea435de1cd05eab179039a8d (patch)
tree970ac78108fa329c76070f30ed1b3280add80c87 /commit.c
parente19713638985533ce461db072b49112da5bd2042 (diff)
parent6160b2e9a486f5dc29f621e94a0e5dcce0ab3d52 (diff)
downloadgit-9c31b19dd00981fcea435de1cd05eab179039a8d.zip
git-9c31b19dd00981fcea435de1cd05eab179039a8d.tar.gz
git-9c31b19dd00981fcea435de1cd05eab179039a8d.tar.bz2
Merge branch 'pw/rebase-i-more-options'
"git rebase -i" learns a bit more options. * pw/rebase-i-more-options: t3436: do not run git-merge-recursive in dashed form rebase: add --reset-author-date rebase -i: support --ignore-date rebase -i: support --committer-date-is-author-date am: stop exporting GIT_COMMITTER_DATE rebase -i: add --ignore-whitespace flag
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/commit.c b/commit.c
index 4ce8cb3..bc741e7 100644
--- 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);