Skip to content

remove "continue" return value from callback

Administrator requested to merge cc/git-refactors-5 into main

Created by: camdencheek

As it was, there were two ways to stop a search: canceling the context or returning false from the callback. This removes the second method, leaving just context cancellation as a signal for early search cancellation. I chose contexts rather than callback return values because the callback is only called when a search result is found, so if a search has no results, it cannot be cancelled early with that method. Additionally, this moves a context check into the inner job loop so that if the context is canceled, the entire job doesn't need to execute before seeing that. This cuts a second or so of extra CPU work off the end of early-returning diff searches.

Stacked on #25615

Merge request reports

Loading