From: Stephen Sinclair Date: Fri, 11 Jan 2008 20:10:53 GMT Subject: [PATCH] Add committer and author names to top of COMMIT_EDITMSG. Message-ID: <9b3e2dc20801111210n7bd7a71cw437819aa6253ae85@mail.gmail.com> Add committer and author names to top of COMMIT_EDITMSG. Signed-off-by: Stephen Sinclair --- builtin-commit.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/builtin-commit.c b/builtin-commit.c index 73f1e35..4fd9367 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -423,8 +423,18 @@ static int prepare_log_message(const char *index_file, const char *prefix) "#\n", git_path("MERGE_HEAD")); + fprintf(fp, "\n"); + + fprintf(fp, + "# Committer: %s\n" + "# Author: %s\n" + "#\n", + fmt_name(getenv("GIT_AUTHOR_NAME"), + getenv("GIT_AUTHOR_EMAIL")), + fmt_name(getenv("GIT_COMMITTER_NAME"), + getenv("GIT_COMMITTER_EMAIL"))); + fprintf(fp, - "\n" "# Please enter the commit message for your changes.\n" "# (Comment lines starting with '#' will "); if (cleanup_mode == CLEANUP_ALL) -- 1.5.4.rc2.85.ga7943-dirty