mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-10-18 19:10:30 +08:00
radicle/git/canonical: Fix glob rewrite rule for trailing asterisk
Previously a rule like `refs/heads/releases-*` would be rewritten incorrectly to `refs/heads/releases-**/*` matching the 'trailing asterisk' rule. Simplify the rewrite rule so that a trailing `*` becomes a prefix matching rule. Add tests.
This commit is contained in:
committed by
Fintan Halpenny
parent
455138f4a7
commit
fb40bdc0ac
@@ -60,6 +60,13 @@ COB type names and payload IDs remain unchanged for backwards compatibility.
|
||||
- Delete invalid node addresses, of the IPv6 type, from the SQLite address book.
|
||||
Entries deleted include ones that have an address of the form `[]:port`, or
|
||||
that have an invalid address within the `[]`.
|
||||
- Correctly handle the canonical reference rules that have a glob star suffix,
|
||||
e.g., `refs/heads/main*`, `refs/heads/main-*`, etc.
|
||||
Previously, these would be expanded into sub-component searches. For example,
|
||||
in the previous examples, the search would be expanded to
|
||||
`refs/heads/main**/*` and `refs/heads/main-**/*`.
|
||||
Now, the rule will match by prefix, e.g. `refs/heads/main-*` will match
|
||||
`refs/heads/main-a`, `refs/heads/main-b`, `refs/heads/main-deadbeef`, etc.
|
||||
|
||||
## 1.8.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user