]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/log.c
Merge branch 'ab/diff-deferred-free'
[thirdparty/git.git] / builtin / log.c
index fffaf51970d3554e4d01c587bb045225184b8135..f67b67d80ed1e8d7cd95982a8da96b435b8a452b 100644 (file)
@@ -1224,14 +1224,20 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file,
                 */
                struct diff_options opts;
                struct strvec other_arg = STRVEC_INIT;
+               struct range_diff_options range_diff_opts = {
+                       .creation_factor = rev->creation_factor,
+                       .dual_color = 1,
+                       .diffopt = &opts,
+                       .other_arg = &other_arg
+               };
+
                diff_setup(&opts);
                opts.file = rev->diffopt.file;
                opts.use_color = rev->diffopt.use_color;
                diff_setup_done(&opts);
                fprintf_ln(rev->diffopt.file, "%s", rev->rdiff_title);
                get_notes_args(&other_arg, rev);
-               show_range_diff(rev->rdiff1, rev->rdiff2,
-                               rev->creation_factor, 1, &opts, &other_arg);
+               show_range_diff(rev->rdiff1, rev->rdiff2, &range_diff_opts);
                strvec_clear(&other_arg);
        }
 }
@@ -1673,7 +1679,7 @@ static void infer_range_diff_ranges(struct strbuf *r1,
                                    struct commit *head)
 {
        const char *head_oid = oid_to_hex(&head->object.oid);
-       int prev_is_range = !!strstr(prev, "..");
+       int prev_is_range = is_range_diff_range(prev);
 
        if (prev_is_range)
                strbuf_addstr(r1, prev);