]> git.ipfire.org Git - thirdparty/git.git/blobdiff - log-tree.c
strmap: enable allocations to come from a mem_pool
[thirdparty/git.git] / log-tree.c
index 55a68d0c6101a7a287c9544e1963427fd0b77793..1927f917ce94ce2ec95c889754d6a86177fa2cac 100644 (file)
@@ -15,7 +15,6 @@
 #include "sequencer.h"
 #include "line-log.h"
 #include "help.h"
-#include "interdiff.h"
 #include "range-diff.h"
 
 static struct decoration name_decoration = { "object names" };
@@ -800,7 +799,8 @@ void show_log(struct rev_info *opt)
 
                next_commentary_block(opt, NULL);
                fprintf_ln(opt->diffopt.file, "%s", opt->idiff_title);
-               show_interdiff(opt, 2);
+               show_interdiff(opt->idiff_oid1, opt->idiff_oid2, 2,
+                              &opt->diffopt);
 
                memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff));
        }
@@ -885,7 +885,7 @@ int log_tree_diff_flush(struct rev_info *opt)
 
 static int do_diff_combined(struct rev_info *opt, struct commit *commit)
 {
-       diff_tree_combined_merge(commit, opt->dense_combined_merges, opt);
+       diff_tree_combined_merge(commit, opt);
        return !opt->loginfo;
 }
 
@@ -917,26 +917,15 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
        }
 
        /* More than one parent? */
-       if (parents && parents->next) {
+       if (parents->next) {
                if (opt->ignore_merges)
                        return 0;
                else if (opt->combine_merges)
                        return do_diff_combined(opt, commit);
-               else if (opt->first_parent_only) {
-                       /*
-                        * Generate merge log entry only for the first
-                        * parent, showing summary diff of the others
-                        * we merged _in_.
-                        */
-                       parse_commit_or_die(parents->item);
-                       diff_tree_oid(get_commit_tree_oid(parents->item),
-                                     oid, "", &opt->diffopt);
-                       log_tree_diff_flush(opt);
-                       return !opt->loginfo;
+               else if (!opt->first_parent_only) {
+                       /* If we show multiple diffs, show the parent info */
+                       log->parent = parents->item;
                }
-
-               /* If we show individual diffs, show the parent info */
-               log->parent = parents->item;
        }
 
        showed_log = 0;
@@ -952,7 +941,7 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
 
                /* Set up the log info for the next parent, if any.. */
                parents = parents->next;
-               if (!parents)
+               if (!parents || opt->first_parent_only)
                        break;
                log->parent = parents->item;
                opt->loginfo = log;