Skip to content

support searching multiple revs per repo (`repo:r@branch1:branch2`) in text search

Administrator requested to merge search-multi-revs-per-repo into master

Created by: sqs

Adds support for searching multiple revisions in the same repository for text search (currently it is only supported for commit/diff search). This is useful in some cases, such as when there are multiple active long-running development branches (and you want to find results on any branch).

When multiple revspecs are given for a repository, the Zoekt index is bypassed completely. There is a slight optimization potential to use the index for the default branch if it is one of the revspecs listed, but for simplicity that optimization is not implemented here. We will evaluate usage patterns with customers manually to see if it is worthwhile.

This is behind the site config feature flag experimentalFeatures.searchMultipleRevisionsPerRepository (default off).

This only supports searching explicitly listed revspecs in the query; it does not yet support the repo:r@*refs/heads:^refs/heads/foo syntax that diff/commit search support). When that glob syntax is supported (and this feature is evaluated thoroughly for perf impact and use case value), the feature flag will be removed.

The changelog is updated, but docs aren't (because this is still an experimental feature and is not worth adding confusion to the search query syntax page for yet).

Merge request reports

Loading