From: Junio C Hamano Date: Tue, 18 Apr 2006 20:18:21 +0000 (-0700) Subject: Merge branch 'lt/logopt' into next X-Git-Tag: v1.4.1-rc1~208 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/524765efa550ea43d9f5aeff6b3c12264f664189?hp=-c Merge branch 'lt/logopt' into next * lt/logopt: Fix "git log --stat": make sure to set recursive with --stat. --- 524765efa550ea43d9f5aeff6b3c12264f664189 diff --combined revision.c index 2976497ebf,4d2a64ef6b..dbd54da5ba --- a/revision.c +++ b/revision.c @@@ -791,8 -791,6 +791,6 @@@ int setup_revisions(int argc, const cha if (revs->dense_combined_merges) revs->diffopt.output_format = DIFF_FORMAT_PATCH; } - if (revs->diffopt.output_format == DIFF_FORMAT_PATCH) - revs->diffopt.recursive = 1; revs->diffopt.abbrev = revs->abbrev; diff_setup_done(&revs->diffopt); @@@ -853,17 -851,6 +851,17 @@@ static void rewrite_parents(struct rev_ } } +static void mark_boundary_to_show(struct commit *commit) +{ + struct commit_list *p = commit->parents; + while (p) { + commit = p->item; + p = p->next; + if (commit->object.flags & BOUNDARY) + commit->object.flags |= BOUNDARY_SHOW; + } +} + struct commit *get_revision(struct rev_info *revs) { struct commit_list *list = revs->commits; @@@ -901,20 -888,8 +899,20 @@@ } if (commit->object.flags & SHOWN) continue; - if (!(commit->object.flags & BOUNDARY) && - (commit->object.flags & UNINTERESTING)) + + /* We want to show boundary commits only when their + * children are shown. When path-limiter is in effect, + * rewrite_parents() drops some commits from getting shown, + * and there is no point showing boundary parents that + * are not shown. After rewrite_parents() rewrites the + * parents of a commit that is shown, we mark the boundary + * parents with BOUNDARY_SHOW. + */ + if (commit->object.flags & BOUNDARY_SHOW) { + commit->object.flags |= SHOWN; + return commit; + } + if (commit->object.flags & UNINTERESTING) continue; if (revs->min_age != -1 && (commit->date > revs->min_age)) continue; @@@ -927,8 -902,6 +925,8 @@@ if (revs->parents) rewrite_parents(revs, commit); } + if (revs->boundary) + mark_boundary_to_show(commit); commit->object.flags |= SHOWN; return commit; } while (revs->commits);