path: root/builtin/commit.c
diff options
authorPhillip Wood <>2020-08-17 17:40:01 (GMT)
committerJunio C Hamano <>2020-08-17 18:58:37 (GMT)
commite8cbe2118a8e3c1aa71ed8d93f96001decebde1d (patch)
tree2a431c9955a73175b6edc8ee95cc1dfa311946d5 /builtin/commit.c
parentef484add9f6ba846c62e4f13ebe0ba99b9cc4aa5 (diff)
am: stop exporting GIT_COMMITTER_DATE
The implementation of --committer-date-is-author-date exports GIT_COMMITTER_DATE to override the default committer date but does not reset GIT_COMMITTER_DATE in the environment after creating the commit so it is set in the environment of any hooks that get run. We're about to add the same functionality to the sequencer and do not want to have GIT_COMMITTER_DATE set when running hooks or exec commands so lets update commit_tree_extended() to take an explicit committer so we override the default date without setting GIT_COMMITTER_DATE in the environment. Signed-off-by: Phillip Wood <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/commit.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index d3e7781..2785344 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1675,8 +1675,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
if (commit_tree_extended(sb.buf, sb.len, &active_cache_tree->oid,
- parents, &oid, author_ident.buf, sign_commit,
- extra)) {
+ parents, &oid, author_ident.buf, NULL,
+ sign_commit, extra)) {
die(_("failed to write commit object"));