Message ID | 3abc713092456b7c34ac72c0064b0b5c51ac726f.1588347029.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Integrating line-log and changed-path Bloom filters | expand |
On Fri, May 01, 2020 at 03:30:28PM +0000, SZEDER Gábor via GitGitGadget wrote: > From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= <szeder.dev@gmail.com> > > The previous patch made it possible to perform line-level filtering > during history traversal instead of in an expensive preprocessing > step, but it still requires some simpler preprocessing steps, notably > topo-ordering. However, nowadays we have commit-graphs storing > generation numbers, which make it possible to incrementally traverse > the history in topological order, without the preparatory limit_list() > and sort_in_topological_order() steps; see b45424181e (revision.c: > generation-based topo-order algorithm, 2018-11-01). > > [snip] This one makes sense, too. Sorry for a long gap in reviewing parts of this series. A few other things have popped up throughout the day. I'll get to the last one shortly. Thanks, Taylor
diff --git a/revision.c b/revision.c index 3228db9af6d..3356ede9a20 100644 --- a/revision.c +++ b/revision.c @@ -2790,6 +2790,12 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s if (revs->diffopt.objfind) revs->simplify_history = 0; + if (revs->line_level_traverse) { + if (want_ancestry(revs)) + revs->limited = 1; + revs->topo_order = 1; + } + if (revs->topo_order && !generation_numbers_enabled(the_repository)) revs->limited = 1; @@ -2809,11 +2815,6 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s revs->diffopt.abbrev = revs->abbrev; - if (revs->line_level_traverse) { - revs->limited = 1; - revs->topo_order = 1; - } - diff_setup_done(&revs->diffopt); grep_commit_pattern_type(GREP_PATTERN_TYPE_UNSPECIFIED,