diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-03 12:37:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-03 12:37:01 -0700 |
commit | 9c31b19dd00981fcea435de1cd05eab179039a8d (patch) | |
tree | 970ac78108fa329c76070f30ed1b3280add80c87 /commit.c | |
parent | Twelfth batch (diff) | |
parent | t3436: do not run git-merge-recursive in dashed form (diff) | |
download | tgif-9c31b19dd00981fcea435de1cd05eab179039a8d.tar.xz |
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.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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); |