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

[PATCH v2 05/10] mailmap: add mailmap structure to rev_info and pp

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 8, 2013, 00:10 UTC
Message-ID
<1357603821-8647-6-git-send-email-gitster@pobox.com>
In-Reply-To
<1357603821-8647-1-git-send-email-gitster@pobox.com>
From: Antoine Pelisse <apelisse@gmail.com>

Pass a mailmap from rev_info to pretty_print_context to so that the pretty printer can use rewritten name and email address when showing commits.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.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.304.gf036638
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 18 in “reroll of ap/log-mailmap”
  1. 00/10 reroll of ap/log-mailmapJunio C Hamano, Jan 8, 2013
  2. 01/10 string-list: allow case-insensitive string listJunio C Hamano, Jan 8, 2013
  3. René ScharfeJan 10, 2013
  4. 02/10 Use split_ident_line to parse author and committerJunio C Hamano, Jan 8, 2013
  5. 03/10 mailmap: remove email copy and length limitationJunio C Hamano, Jan 8, 2013
  6. Antoine PelisseJan 9, 2013
  7. Junio C HamanoJan 9, 2013
  8. Junio C HamanoJan 9, 2013
  9. 04/10 mailmap: simplify map_user() interfaceJunio C Hamano, Jan 8, 2013
  10. 05/10 mailmap: add mailmap structure to rev_info and ppJunio C Hamano, Jan 8, 2013
  11. 06/10 pretty: use mailmap to display username and emailJunio C Hamano, Jan 8, 2013
  12. 07/10 log: add --use-mailmap optionJunio C Hamano, Jan 8, 2013
  13. 08/10 test: add test for --use-mailmap optionJunio C Hamano, Jan 8, 2013
  14. 09/10 log: grep author/committer using mailmapJunio C Hamano, Jan 8, 2013
  15. 10/10 log: add log.mailmap configuration optionJunio C Hamano, Jan 8, 2013
  16. Antoine PelisseJan 8, 2013
  17. Junio C HamanoJan 8, 2013
  18. Junio C HamanoJan 8, 2013

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.