summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-06-17 10:15:17 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-06-17 10:15:17 -0700
commitbdc81d15a238c4402cc493817086a0c50dc9a508 (patch)
tree402cf4efc15c38e7528279c6a9168ba108ef4a5f
parentMerge branch 'bl/userdiff-octave' (diff)
parentrevision: keep topo-walk free of unintersting commits (diff)
downloadtgif-bdc81d15a238c4402cc493817086a0c50dc9a508.tar.xz
Merge branch 'ds/topo-traversal-using-commit-graph'
Prepare use of reachability index in topological walker that works on a range (A..B). * ds/topo-traversal-using-commit-graph: revision: keep topo-walk free of unintersting commits revision: use generation for A..B --topo-order queries
-rw-r--r--revision.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index d4aaf0ef25..621feb9df7 100644
--- a/revision.c
+++ b/revision.c
@@ -436,7 +436,9 @@ static struct commit *handle_commit(struct rev_info *revs,
die("unable to parse commit %s", name);
if (flags & UNINTERESTING) {
mark_parents_uninteresting(commit);
- revs->limited = 1;
+
+ if (!revs->topo_order || !generation_numbers_enabled(the_repository))
+ revs->limited = 1;
}
if (revs->sources) {
char **slot = revision_sources_at(revs->sources, commit);
@@ -3263,6 +3265,9 @@ static void expand_topo_walk(struct rev_info *revs, struct commit *commit)
struct commit *parent = p->item;
int *pi;
+ if (parent->object.flags & UNINTERESTING)
+ continue;
+
if (parse_commit_gently(parent, 1) < 0)
continue;