radicle: add sigrefs ref name constructor

Similar to the `id` function, add a `sigrefs` function to construct
the reference name for a given remote's `rad/sigrefs`.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
Fintan Halpenny 2023-08-28 10:05:43 +01:00 committed by cloudhead
parent 030419932e
commit c06b225877
No known key found for this signature in database
1 changed files with 9 additions and 0 deletions

View File

@ -200,6 +200,15 @@ pub mod refs {
IDENTITY_BRANCH.with_namespace(remote.into())
}
/// Get the branch where the `remote`'s signed references are
/// stored.
///
/// `refs/namespaces/<remote>/refs/rad/sigrefs`
///
pub fn sigrefs(remote: &RemoteId) -> Namespaced {
SIGREFS_BRANCH.with_namespace(remote.into())
}
/// The collaborative object reference, identified by `typename` and `object_id`, under the given `remote`.
///
/// `refs/namespaces/<remote>/refs/cobs/<typename>/<object_id>`