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 <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
ef484add9f
commit
e8cbe2118a
7
commit.h
7
commit.h
@ -316,10 +316,9 @@ int commit_tree(const char *msg, size_t msg_len,
|
||||
|
||||
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,
|
||||
struct commit_extra_header *);
|
||||
struct commit_list *parents, struct object_id *ret,
|
||||
const char *author, const char *committer,
|
||||
const char *sign_commit, struct commit_extra_header *);
|
||||
|
||||
struct commit_extra_header *read_commit_extra_headers(struct commit *, const char **);
|
||||
|
||||
|
Reference in New Issue
Block a user