git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] mailmap: Add mailmap structure to rev_info and pp

From
Antoine Pelisse <apelisse@gmail.com>
Date
Dec 11, 2012, 22:21 UTC
Message-ID
<1355264493-8298-4-git-send-email-apelisse@gmail.com>
In-Reply-To
<1355264493-8298-1-git-send-email-apelisse@gmail.com>

the mailmap string_list structure filled with mailmap information is passed along from rev_info to pretty_print_context to provide mailmap information to pretty print each commits with the correct username and email.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
 commit.h   | 1 +
 log-tree.c | 1 +
 revision.h | 1 +
 3 files changed, 3 insertions(+)
diff --git a/commit.h b/commit.h
index b6ad8f3..7f8f987 100644
--- a/commit.h
+++ b/commit.h
@@ -89,6 +89,7 @@ struct pretty_print_context {
 	char *notes_message;
 	struct reflog_walk_info *reflog_info;
 	const char *output_encoding;
+	struct string_list *mailmap;
 };
 
 struct userformat_want {
diff --git a/log-tree.c b/log-tree.c
index 4f86def..92254fd 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -671,6 +671,7 @@ void show_log(struct rev_info *opt)
 	ctx.preserve_subject = opt->preserve_subject;
 	ctx.reflog_info = opt->reflog_info;
 	ctx.fmt = opt->commit_format;
+	ctx.mailmap = opt->mailmap;
 	pretty_print_commit(&ctx, commit, &msgbuf);
 
 	if (opt->add_signoff)
diff --git a/revision.h b/revision.h
index 059bfff..83a79f5 100644
--- a/revision.h
+++ b/revision.h
@@ -143,6 +143,7 @@ struct rev_info {
 	const char	*subject_prefix;
 	int		no_inline;
 	int		show_log_size;
+	struct string_list *mailmap;
 
 	/* Filter by commit log message */
 	struct grep_opt	grep_filter;
-- 
1.8.1.rc1.5.g7e0651a
Previous: Antoine PelisseNext: Antoine Pelisse
Message 4 of 12 in “Allow git log to use mailmap file”
  1. 0/5 Allow git log to use mailmap fileAntoine Pelisse, Dec 11, 2012
  2. 1/5 Use split_ident_line to parse author and committerAntoine Pelisse, Dec 11, 2012
  3. 2/5 mailmap: Remove buffer length limit in map_userAntoine Pelisse, Dec 11, 2012
  4. 3/5 mailmap: Add mailmap structure to rev_info and ppAntoine Pelisse, Dec 11, 2012
  5. 4/5 pretty: Use mailmap to display username and emailAntoine Pelisse, Dec 11, 2012
  6. Junio C HamanoDec 11, 2012
  7. Antoine PelisseDec 12, 2012
  8. 5/5 log: Add --use-mailmap optionAntoine Pelisse, Dec 11, 2012
  9. Antoine PelisseDec 12, 2012
  10. Junio C HamanoDec 12, 2012
  11. Junio C HamanoDec 11, 2012
  12. Rich MidwinterDec 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.