Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About this feature
Repositoryalready supports arbitrary key-value metadata viaMetadata, queryable withmeta.<field>:. This PR adds the same concept at branch level.RepositoryBranchgets aMetadata map[string]stringfield and a new query operatorbranch.meta.<field>:<regex>matches only files belonging to a branch whose metadata satisfies the given regex. Population happens the same way repository metadata does today, via the.metafile passed to zoekt-git-indexWhy we want this feature
Repository-level metadata works well when an attribute is constant across the whole repo, but many repos have several long-lived branches (release lines, LTS branches, version branches) where an attribute like "actively supported" or "end of life" differs per branch, not per repo. Also are some branches maintained by different teams which we would like to assign and filter for. Today there is no way to express that without tagging the whole repo.
branch.meta.lets indexers attach that per-branch fact and lets searchers scope a query to only the branches that currently matter, e.g. branch.meta.supported:trueWhy this is still a draft
Opening this early to get feedback on the approach before polishing it further:
We'd love to hear your feedback and are happy to discuss any part of this further.