Merge branch 'lt/logopt' into next
authorJunio C Hamano <junkio@cox.net>
Tue, 18 Apr 2006 20:18:21 +0000 (13:18 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 18 Apr 2006 20:18:21 +0000 (13:18 -0700)
* lt/logopt:
Fix "git log --stat": make sure to set recursive with --stat.

1  2 
revision.c
diff --combined revision.c
index 2976497ebf6843e91d954475af3a61e9ba734cb4,4d2a64ef6b3e0a8f9af30264c5e7f2dc8b56d148..dbd54da5baec5b5a2320a40a66da24541705e971
@@@ -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;
                }
                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;
                        if (revs->parents)
                                rewrite_parents(revs, commit);
                }
 +              if (revs->boundary)
 +                      mark_boundary_to_show(commit);
                commit->object.flags |= SHOWN;
                return commit;
        } while (revs->commits);