mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-08 21:55:47 +00:00
e17fc89a8d
In order to optimize a query like '(author(_) | @) & main..', we'll probably need a predicate form of an iterable set so that the query can be evaluated to '(main..).iter().filter(author(_) | @)'. And if a predicate function can terminate the source iterator early (by returning true/false/false_forever), complexity of a filtered revset is basically the same as an intersection of iterator pair. This means we can eventually merge IntersectionRevset with FilterRevset. With that in mind, this patch removes the redundant 'candidates' field from the filter node, which would otherwise appear in the predicate function as 'candidates.contains(entry)'. A filter node with candidates was somewhat useful while rewriting the tree, but that can be dealt with a view function like as_filter_intersection() in this patch. This also simplify the subsequent filter transformation as we no longer need to test if candidates == All. |
||
---|---|---|
.. | ||
src | ||
tests | ||
testutils | ||
build.rs | ||
Cargo.toml |