mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-11-12 14:40:38 +08:00
A `Namespace` is a '/' separated list of components, where each component represents another level of the namespaces hierarchy. Notice that a `RefString` is also a '/' separated list of components, thus it could be reused to define a `Namespace`. This change uses this observation and reworks `Namespace` to be backed by a `RefString`. This naturally leads to defining its helper functions to return `Namespaced` and `NamespacedPattern` reference names. They are reworked to take a `Qualified` for regular reference names and `QualifiedPattern` for refspec names, respectively. This leads to changing the backing vector of `Glob` to use `QualifiedPattern` instead of `PatternString`. While changing `Glob`, it was also noticed that the PhantomData was not used correctly -- all `impl`s used a generic parameter. This was changed to use the `Namespace`, `Tag`, and `Branch` types directly, providing the type-safety that would be expected. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett