Skip to content

git: Validate pseudo-revisions via `git.ValidateRevisions()`

Patrick Steinhardt requested to merge pks-git-pseudorevision-validation into master

We've got multiple callsites which have open-coded knowledge around validating pseudo-revisions. These implementations are both too lenient in that they don't properly verify the revisions, as well as too rigid as they don't allow certain pseudo-revisions that would be perfectly acceptable.

This MR thus extends git.ValidateRevisions() so that it's able to validate both path-scoped revisions as well as pseudo-revisions and converts existing open-coded variants to use it.

Merge request reports