Skip to content

search: remove dead code for repoHasFile logic

Administrator requested to merge rvt/no-user-private-repos into main

Created by: rvantonder

Stacked on https://github.com/sourcegraph/sourcegraph/pull/31894

Only repoHasFile logic depends on IndexedSearchRequest now. But repoHasFile can never run in global mode: https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/internal/search/job/job.go?L472-473&subtree=true. So globalSearch is always false and this makes IndexedUniverseSearchRequest dead.

This also makes UserPrivateRepos []types.MinimalRepo in TextParameters dead, since it will never be populated (private repos for global search are populated only in global search jobs).

Test plan

Semantics-preserving.

Merge request reports

Loading