search: factor out args.Mode dependency deep in call chain
Created by: rvantonder
I want to stop us from mutating args
values, specifically args.Mode
, it's blocking job creation for text search which happens two PRs up the stack (https://github.com/sourcegraph/sourcegraph/pull/26629)
The control flow dependent on args.Mode
is extremely complex. I need to extract dependencies out of NewIndexed...
calls so that I can simplify it in the doResult
caller. This is the only way I can keep handles on a sane, mechanical change. It'll simplify once I have job creation that separates these interactions.