Radish alpha
r
rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt
Git libraries for Radicle
Radicle
Git
ref-format: Relax first component of namespaced
Merged lorenz opened 7 months ago

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.

lorenz opened with revision 9ba46e86 on base 786248ad +15 -3 7 months ago

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.

fintohaps pushed revision 2 5f842d6a on base 786248ad +15 -3 7 months ago

REVIEW: update the example

In the commit message it said that we should be allowing refs/namespaces/xyz/HEAD, but in this example it used refs/HEAD.


REVIEW: match for refs or HEAD

Instead of allowing any component, we limit to either refs or HEAD.

Maybe we can be more relaxed here, but my thinking is that since we were strict before and want to allow for HEAD – as per the docs – then we just relax that and only that check.

lorenz pushed revision 3 070a96c6 on base 786248ad +14 -2 7 months ago

Only allow HEAD as suggested by Fintan.

fintohaps merged revision 070a96c6 at 24237552 7 months ago