]> git.ipfire.org Git - thirdparty/git.git/blobdiff - log-tree.c
Start the 2.46 cycle
[thirdparty/git.git] / log-tree.c
index a102893621689f75ef174114a5bdb4b7d30b994d..16031b44e75076f6e8f537cdbd11212eb6eaf268 100644 (file)
@@ -480,7 +480,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,
 
        *need_8bit_cte_p = 0; /* unknown */
 
-       if (opt->extra_headers)
+       if (opt->extra_headers && *opt->extra_headers)
                strbuf_addstr(&headers, opt->extra_headers);
 
        fprintf(opt->diffopt.file, "From %s Mon Sep 17 00:00:00 2001\n", name);
@@ -773,7 +773,7 @@ void show_log(struct rev_info *opt)
                         */
                        show_reflog_message(opt->reflog_info,
                                            opt->commit_format == CMIT_FMT_ONELINE,
-                                           &opt->date_mode,
+                                           opt->date_mode,
                                            opt->date_mode_explicit);
                        if (opt->commit_format == CMIT_FMT_ONELINE)
                                return;
@@ -1007,7 +1007,7 @@ static int do_remerge_diff(struct rev_info *opt,
                           struct object_id *oid)
 {
        struct merge_options o;
-       struct commit_list *bases;
+       struct commit_list *bases = NULL;
        struct merge_result res = {0};
        struct pretty_print_context ctx = {0};
        struct commit *parent1 = parents->item;
@@ -1032,7 +1032,8 @@ static int do_remerge_diff(struct rev_info *opt,
        /* Parse the relevant commits and get the merge bases */
        parse_commit_or_die(parent1);
        parse_commit_or_die(parent2);
-       bases = repo_get_merge_bases(the_repository, parent1, parent2);
+       if (repo_get_merge_bases(the_repository, parent1, parent2, &bases) < 0)
+               exit(128);
 
        /* Re-merge the parents */
        merge_incore_recursive(&o, bases, parent1, parent2, &res);