mailmap: add mailmap structure to rev_info and pp

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>
This commit is contained in:
Antoine Pelisse 2013-01-05 22:26:41 +01:00 committed by Junio C Hamano
parent ea02ffa385
commit 0e2913b042
3 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,7 @@ struct pretty_print_context {
char *notes_message; char *notes_message;
struct reflog_walk_info *reflog_info; struct reflog_walk_info *reflog_info;
const char *output_encoding; const char *output_encoding;
struct string_list *mailmap;
}; };
struct userformat_want { struct userformat_want {

View File

@ -671,6 +671,7 @@ void show_log(struct rev_info *opt)
ctx.preserve_subject = opt->preserve_subject; ctx.preserve_subject = opt->preserve_subject;
ctx.reflog_info = opt->reflog_info; ctx.reflog_info = opt->reflog_info;
ctx.fmt = opt->commit_format; ctx.fmt = opt->commit_format;
ctx.mailmap = opt->mailmap;
pretty_print_commit(&ctx, commit, &msgbuf); pretty_print_commit(&ctx, commit, &msgbuf);
if (opt->add_signoff) if (opt->add_signoff)

View File

@ -143,6 +143,7 @@ struct rev_info {
const char *subject_prefix; const char *subject_prefix;
int no_inline; int no_inline;
int show_log_size; int show_log_size;
struct string_list *mailmap;
/* Filter by commit log message */ /* Filter by commit log message */
struct grep_opt grep_filter; struct grep_opt grep_filter;