ref-format: Relax first component of namespaced
The manual page says:
Git supports dividing the refs of a single repository into multiple namespaces, each of which has its own branches, tags, and
HEAD.
Here, the mention of HEAD implies that requiring all
namespaced to start with
refs/namespaces/*/refs
is too strict, as there are legal namespaced refs such as
refs/namespaces/*/HEAD
which are not captured. Relax the corresponding condition, change documentation and add a test to avoid regression.
2 files changed
+14
-2
786248ad
→
24237552
modified radicle-git-ext/git-ref-format/core/src/deriv.rs
@@ -267,9 +267,10 @@ impl Display for Qualified<'_> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| + | |
|
|
|
|
|
@@ -365,7 +366,7 @@ impl<'a> From<&'a RefStr> for Option<Namespaced<'a>> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-git-ext/t/src/git_ref_format/tests.rs
@@ -157,6 +157,17 @@ fn namespaced() {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|