mailmap: add mailmap structure to rev_info and pp
authorAntoine Pelisse <apelisse@gmail.com>
Sat, 5 Jan 2013 21:26:41 +0000 (22:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Jan 2013 20:33:08 +0000 (12:33 -0800)
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
log-tree.c
revision.h
index b6ad8f3f307a46cd5a0555ab346abaa20013b13a..7f8f9878d8e10a425da3241f75655cc1213debe1 100644 (file)
--- 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 {
index 4f86defe324bac8374585df5d9e8ef7b5f9a3524..92254fd493e38a7d806e147b85853360b5ccff96 100644 (file)
@@ -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)
index 059bfff812da8033681aa11c5a9ca9085881747e..83a79f5815f7d868dc7d36f61d9890625251e6cc 100644 (file)
@@ -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;