From c06b2258779b78a2317084b8da541cfd0a64d6f0 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Mon, 28 Aug 2023 10:05:43 +0100 Subject: [PATCH] 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 X-Clacks-Overhead: GNU Terry Pratchett --- radicle/src/git.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/radicle/src/git.rs b/radicle/src/git.rs index 0a3ebeda..75d458b2 100644 --- a/radicle/src/git.rs +++ b/radicle/src/git.rs @@ -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//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//refs/cobs//`