Skip to content

search: relax pattern interpretation of @ in repo searches

Administrator requested to merge backend-integration/rvt/repo-asdf into main

Created by: rvantonder

Addresses #27594 (closed). Tomas I don't have a quick wholistic solution for fixing this since the code paths substantially changed. What's happening with that change is described in #27816, and it's a consequence of "type:repo now works", the issue is that type:repo made assumptions about @ that we cannot actually make now with the change. With this fix, at least we won't get the alert, but it does mean that:

type:repo sourcegraph@main is just interpreted as type:repo: sourcegraph, and the @suffix has no effect. If this seems like a low effort fix, it absolutely is. I don't have the capacity to fix up repo code even though this has been a thorn for a long time. I just don't want people to use type:repo any more. Use repo:foo@bar or repo:foo rev:bar.

I think using a proper data type member in RepoOptions for rev, based on the contexts in which the pattern matters in repo searches is the right path. A follow up of that would be to target the correct RepoOptions in a repo job. I may

Merge request reports

Loading