revwalk: fix uninteresting revs sometimes not limiting graphwalk
When we want to limit our graphwalk, we use the heuristic of checking whether the newest limiting (uninteresting) revision is newer than the oldest interesting revision. We do so by inspecting whether the first item's commit time of the user-supplied list of revisions is newer than the last added interesting revision. This is wrong though, as the user supplied list is in no way guaranteed to be sorted by increasing commit dates. This could lead us to abort the revwalk early before applying all relevant limiting revisions, outputting revisions which should in fact have been hidden. Fix the heuristic by instead checking whether _any_ of the limiting commits was made earlier than the last interesting commit. Add a test.
Showing
tests/resources/revwalk.git/HEAD
0 → 100644
tests/resources/revwalk.git/config
0 → 100644
tests/resources/revwalk.git/description
0 → 100644
File added
File added
tests/resources/revwalk.git/packed-refs
0 → 100644
tests/resources/revwalk.git/refs/.gitkeep
0 → 100644
Please
register
or
sign in
to comment