compute: don't hydrate file contents for "type:path"
Created by: rvantonder
Stacked on https://github.com/sourcegraph/sourcegraph/pull/34677
I want compute queries to efficiently return just a file path result (previously, you couldn't avoid fetching file contents because we always fetched file contents for a given FileMatch
). This PR allows to avoid hydrating content when type:path
is set. Our lack of a dedicated type really leaks into things here and makes my compute code ugly
The state tracking could be entirely avoided by having a dedicated PathMatch
.
Test plan
Added tests.