Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
httpd: accept `/{rid}.git/{nid}/` paths as `GIT_NAMESPACE`-d remotes
Merged did:key:z6MkqbVu...UBAo opened 2 months ago

This patch adds support for serving /{rid}/{nid}/... paths as GIT_NAMESPACE-d http remotes, using {nid} as the namespace. Radicle’s on-disk repo storage already uses a Git-namespace-compatible notion for peer refs (refs/namespaces/*), so it is merely a matter of passing the right $GIT_NAMESPACE to the git http-backend process.

This way, it becomes possible to directly clone or fetch from URLs like http://httpd.domain.tld/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git/z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM to directly access the given node’s ref namespace:

$ cd radicle-explorer
$ git remote add intelfx https://iris.radicle.xyz/z4V1sjrXqjvFdnCUbxPFqd5p4DtH5/z6MkqbVudjUcuxUmwWfW6U886CnhoX5wmkEDsAXju9F9UBAo
$ git pull intelfx work/httpd-git-namespace // or fetch, or ...

Instead of mucking about with

$ git fetch origin refs/namespaces/{nid}/refs/heads/{branch}:refs/heads/{branch}
did:key:z6MkqbVu...UBAo opened with revision fa5447a2 on base 29b952a3 +14 -1 2 months ago

This patch adds support for serving /{rid}/{nid}/... paths as GIT_NAMESPACE-d http remotes, using {nid} as the namespace. Radicle’s on-disk repo storage already uses a Git-namespace-compatible notion for peer refs (refs/namespaces/*), so it is merely a matter of passing the right $GIT_NAMESPACE to the git http-backend process.

This way, it becomes possible to directly clone or fetch from URLs like http://httpd.domain.tld/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git/z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM to directly access the given node’s ref namespace:

$ cd radicle-explorer
$ git remote add intelfx https://iris.radicle.xyz/z4V1sjrXqjvFdnCUbxPFqd5p4DtH5/z6MkqbVudjUcuxUmwWfW6U886CnhoX5wmkEDsAXju9F9UBAo
$ git pull intelfx work/httpd-git-namespace // or fetch, or ...

Instead of mucking about with

$ git fetch origin refs/namespaces/{nid}/refs/heads/{branch}:refs/heads/{branch}
did:key:z6MkqbVu...UBAo pushed revision 2 6a867012 on base 29b952a3 +14 -1 2 months ago
did:key:z6MkqbVu...UBAo pushed revision 3 81fe8710 on base 29b952a3 +14 -1 2 months ago
Defelo accepted 2 months ago
rudolfs pushed revision 4 c5b50d72 on base 29b952a3 +14 -1 2 months ago

Fix lints

rudolfs merged revision c5b50d72 at 1b6d2830 2 months ago