git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add committer and author names to top of COMMIT_EDITMSG.
@ 2008-01-11 20:10 Stephen Sinclair
  2008-01-11 21:26 ` Johannes Schindelin
  2008-01-11 23:36 ` Junio C Hamano
  0 siblings, 2 replies; 17+ messages in thread
From: Stephen Sinclair @ 2008-01-11 20:10 UTC (permalink / raw)
  To: git, Junio C Hamano

Add committer and author names to top of COMMIT_EDITMSG.

Signed-off-by: Stephen Sinclair <radarsat1@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-01-12  8:03 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-11 20:10 [PATCH] Add committer and author names to top of COMMIT_EDITMSG Stephen Sinclair
2008-01-11 21:26 ` Johannes Schindelin
2008-01-11 23:36 ` Junio C Hamano
2008-01-12  0:09   ` Stephen Sinclair
2008-01-12  0:22     ` Junio C Hamano
2008-01-12  1:33       ` Stephen Sinclair
2008-01-12  1:53         ` Junio C Hamano
2008-01-12  2:25           ` Stephen Sinclair
2008-01-12  4:57             ` Junio C Hamano
2008-01-12  7:26               ` Stephen Sinclair
2008-01-12  8:02                 ` Junio C Hamano
2008-01-12  4:52           ` Jeff King
2008-01-12  5:06             ` Junio C Hamano
2008-01-12  5:30               ` Junio C Hamano
2008-01-12  5:32                 ` Jeff King
2008-01-12  5:56                   ` Junio C Hamano
2008-01-12  5:58                     ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).