Merge branch 'wh/author-committer-ident-config'
[gitweb.git] / log-tree.c
index b243779a0b7dc15200689febe68549a85ce5c6a7..1e56df62a79c0d221fa55ba351b6b16f8027d12b 100644 (file)
@@ -687,8 +687,7 @@ void show_log(struct rev_info *opt)
         */
        if (ctx.need_8bit_cte >= 0 && opt->add_signoff)
                ctx.need_8bit_cte =
-                       has_non_ascii(fmt_name(getenv("GIT_COMMITTER_NAME"),
-                                              getenv("GIT_COMMITTER_EMAIL")));
+                       has_non_ascii(fmt_name(WANT_COMMITTER_IDENT));
        ctx.date_mode = opt->date_mode;
        ctx.date_mode_explicit = opt->date_mode_explicit;
        ctx.abbrev = opt->diffopt.abbrev;
@@ -700,6 +699,7 @@ void show_log(struct rev_info *opt)
        ctx.color = opt->diffopt.use_color;
        ctx.expand_tabs_in_log = opt->expand_tabs_in_log;
        ctx.output_encoding = get_log_output_encoding();
+       ctx.rev = opt;
        if (opt->from_ident.mail_begin && opt->from_ident.name_begin)
                ctx.from_ident = &opt->from_ident;
        if (opt->graph)
@@ -755,14 +755,23 @@ void show_log(struct rev_info *opt)
 
        if (cmit_fmt_is_mail(ctx.fmt) && opt->rdiff1) {
                struct diff_queue_struct dq;
+               struct diff_options opts;
 
                memcpy(&dq, &diff_queued_diff, sizeof(diff_queued_diff));
                DIFF_QUEUE_CLEAR(&diff_queued_diff);
 
                next_commentary_block(opt, NULL);
                fprintf_ln(opt->diffopt.file, "%s", opt->rdiff_title);
+               /*
+                * Pass minimum required diff-options to range-diff; others
+                * can be added later if deemed desirable.
+                */
+               diff_setup(&opts);
+               opts.file = opt->diffopt.file;
+               opts.use_color = opt->diffopt.use_color;
+               diff_setup_done(&opts);
                show_range_diff(opt->rdiff1, opt->rdiff2,
-                               opt->creation_factor, 1, NULL);
+                               opt->creation_factor, 1, &opts);
 
                memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff));
        }