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

[PATCH v2 4/7] mailmap: Add mailmap structure to rev_info and pp

From
Antoine Pelisse <apelisse@gmail.com>
Date
Dec 15, 2012, 18:05 UTC
Message-ID
<1355594754-27589-5-git-send-email-apelisse@gmail.com>
In-Reply-To
<1355594754-27589-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.7.9.5
Previous: Antoine PelisseNext: Antoine Pelisse
Message 5 of 9 in “Allow git log to use mailmap file”
  1. 0/7 Allow git log to use mailmap fileAntoine Pelisse, Dec 15, 2012
  2. 1/7 Use split_ident_line to parse author and committerAntoine Pelisse, Dec 15, 2012
  3. 2/7 mailmap: Remove buffer length limit in map_userAntoine Pelisse, Dec 15, 2012
  4. 3/7 mailmap: Simplify map_user() interfaceAntoine Pelisse, Dec 15, 2012
  5. 4/7 mailmap: Add mailmap structure to rev_info and ppAntoine Pelisse, Dec 15, 2012
  6. 5/7 pretty: Use mailmap to display username and emailAntoine Pelisse, Dec 15, 2012
  7. 6/7 log: Add --use-mailmap optionAntoine Pelisse, Dec 15, 2012
  8. 7/7 test: Add test for --use-mailmap optionAntoine Pelisse, Dec 15, 2012
  9. Junio C HamanoDec 15, 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.