revision: --ancestry-path
[gitweb.git] / log-tree.c
index 1675035d841c5984011ada3422192d82e945daf4..d3ae969f608b50a469aa60b2e925558a6bb437e5 100644 (file)
@@ -284,6 +284,7 @@ void show_log(struct rev_info *opt)
        struct pretty_print_context ctx = {0};
 
        opt->loginfo = NULL;
+       ctx.show_notes = opt->show_notes;
        if (!opt->verbose_header) {
                graph_show_commit(opt->graph);
 
@@ -411,6 +412,7 @@ void show_log(struct rev_info *opt)
        ctx.date_mode = opt->date_mode;
        ctx.abbrev = opt->diffopt.abbrev;
        ctx.after_subject = extra_headers;
+       ctx.reflog_info = opt->reflog_info;
        pretty_print_commit(opt->commit_format, commit, &msgbuf, &ctx);
 
        if (opt->add_signoff)
@@ -512,6 +514,16 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
                        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_.
+                        */
+                       diff_tree_sha1(parents->item->object.sha1, sha1, "", &opt->diffopt);
+                       log_tree_diff_flush(opt);
+                       return !opt->loginfo;
+               }
 
                /* If we show individual diffs, show the parent info */
                log->parent = parents->item;