rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood00650334031bf6e5c9742d71228bb2f73a9b16bf
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Updated",
"patch": {
"id": "5961ac4e18bc98c110b3c62cb2287bad967ffea7",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": "fintohaps"
},
"title": "Migrate `sigrefs` to use `git::repository`",
"state": {
"status": "open",
"conflicts": []
},
"before": "9158df5067429282cbec60292316c13b3d965c5a",
"after": "00650334031bf6e5c9742d71228bb2f73a9b16bf",
"commits": [
"00650334031bf6e5c9742d71228bb2f73a9b16bf",
"8e27fd9b28032e390ec0ecdcfbc22560be1abd56",
"e84e10abf81e88309bf38a0d0d7c49ee7e9ec5bf",
"91fabd88e973814a7022d9b520be972fc24270ce",
"ecb262fa634b6a7669d06de3ee5e73e59947019d",
"97f12120f397243a8bdcf9ab947c5b80f3303a59",
"8c0be1e77e38bbb762799a1c38a71394a19454d6",
"3ef22cf4efe5a39bb1e62d47a05fc1881ab81474",
"ce38b1c5868e0994707eb89cd84ac86be0fcc339",
"56f023496f4d8cafe7ffb378a93fe41c4c411cb4",
"9f07fdef369a6d6f6751869e17fcfe2d21e0d226",
"e6a563b42ea2955c95cefc1b6bd26c227695d2e6",
"99705f51a901c4b268881af76512ee5be76c6466"
],
"target": "09b1f1f77cdec025f8f92f7395a38f76a11a0d85",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "5961ac4e18bc98c110b3c62cb2287bad967ffea7",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": "fintohaps"
},
"description": "This set of changes migrates the `sigrefs` code to use the traits\ndefined in `git::repository`.\n\nEach commit migrates a single trait, and ensures that all tests pass\nat each step.\n\nThe final commit then removes the now unused code.",
"base": "e1867632fb03a1a75b73087e8ce5fb5d0846187c",
"oid": "33fd4967165aa7c99c8b28a301be05183e3a0941",
"timestamp": 1776177809
},
{
"id": "9d50e4fe0d2e419c70f6cdeb78a6e754fcd0e706",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": "fintohaps"
},
"description": "Reworked patch into a stable state",
"base": "9158df5067429282cbec60292316c13b3d965c5a",
"oid": "47c8447f16922c49141e30bd50c7c9b6bec56cc9",
"timestamp": 1778758166
},
{
"id": "147915d641d78a0e8ff8141d5f82ff7fd3ebdeb7",
"author": {
"id": "did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"alias": "fintohaps"
},
"description": "Rebase",
"base": "9158df5067429282cbec60292316c13b3d965c5a",
"oid": "00650334031bf6e5c9742d71228bb2f73a9b16bf",
"timestamp": 1778944464
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "94431d01-f52f-4986-af30-69f2617b4465"
},
"info_url": "https://cci.rad.levitte.org//94431d01-f52f-4986-af30-69f2617b4465.html"
}
Started at: 2026-05-20 10:14:11.775113+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/94431d01-f52f-4986-af30-69f2617b4465/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 168 issues · 45 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 5961ac4e18bc98c110b3c62cb2287bad967ffea7
✓ Switched to branch patch/5961ac4 at revision 147915d
✓ Branch patch/5961ac4 setup to track rad/patches/5961ac4e18bc98c110b3c62cb2287bad967ffea7
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 00650334031bf6e5c9742d71228bb2f73a9b16bf
HEAD is now at 00650334 radicle/storage/sigrefs: Remove unused traits
Exit code: 0
$ rad patch show 5961ac4e18bc98c110b3c62cb2287bad967ffea7 -p
╭─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Title Migrate `sigrefs` to use `git::repository` │
│ Patch 5961ac4e18bc98c110b3c62cb2287bad967ffea7 │
│ Author fintohaps z6Mkire…SQZ3voM │
│ Head 00650334031bf6e5c9742d71228bb2f73a9b16bf │
│ Base 9158df5067429282cbec60292316c13b3d965c5a │
│ Branches patch/5961ac4 │
│ Commits ahead 13, behind 5 │
│ Status open │
│ │
│ This set of changes migrates the `sigrefs` code to use the traits │
│ defined in `git::repository`. │
│ │
│ Each commit migrates a single trait, and ensures that all tests pass │
│ at each step. │
│ │
│ The final commit then removes the now unused code. │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0065033 radicle/storage/sigrefs: Remove unused traits │
│ 8e27fd9 storage/refs/sigrefs: Refactor reference::Writer to repository::reference::Writer │
│ e84e10a storage/refs/sigrefs: Refactor object::Writer to repository::object::Writer │
│ 91fabd8 storage/refs/sigrefs: Refactor sigrefs::reference::Reader to repository::object::Reader │
│ ecb262f storage/refs/sigrefs: Refactor sigrefs::object::Reader to repository::object::Reader │
│ 97f1212 storage/git: Implement git::repository traits for Repository │
│ 8c0be1e radicle/git/repository: Implement git2 adapter for all traits │
│ 3ef22cf radicle/git/repository: Define Revwalk trait │
│ ce38b1c radicle/git/repository: Define Ancestry trait │
│ 56f0234 radicle/git/repository: Define reference::Reader, reference::Writer, symbolic::Writer │
│ 9f07fde radicle/git/repository: Define object::Reader and object::Writer traits │
│ e6a563b radicle/git/repository: Define Git domain types │
│ 99705f5 sigrefs/git: Remove doc link of `Committer::stable` │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ● Revision 5961ac4 @ e186763..33fd496 by fintohaps z6Mkire…SQZ3voM 1 month ago │
│ ↑ Revision 9d50e4f @ 9158df5..47c8447 by fintohaps z6Mkire…SQZ3voM 5 days ago │
│ ↑ Revision 147915d @ 9158df5..0065033 by fintohaps z6Mkire…SQZ3voM 3 days ago │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
commit 00650334031bf6e5c9742d71228bb2f73a9b16bf
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 14 15:32:25 2026 +0100
radicle/storage/sigrefs: Remove unused traits
The `sigrefs` module is migrated to using the `git::repository` family
of traits.
The previous traits are removed and the `RefsEntry` and
`SignatureEntry` types move into the `sigrefs::git` module.
diff --git a/crates/radicle/src/storage/git.rs b/crates/radicle/src/storage/git.rs
index 23495324a..743b43b29 100644
--- a/crates/radicle/src/storage/git.rs
+++ b/crates/radicle/src/storage/git.rs
@@ -34,7 +34,7 @@ use crate::git::fmt::{
};
pub use crate::storage::{Error, RepositoryError};
-use super::refs::{RefsAt, sigrefs};
+use super::refs::RefsAt;
use super::{RemoteId, RemoteRepository, ValidateRepository};
pub static NAMESPACES_GLOB: LazyLock<PatternString> =
@@ -1083,59 +1083,6 @@ impl Repository {
}
}
-impl sigrefs::git::object::Reader for Repository {
- fn read_commit(
- &self,
- oid: &Oid,
- ) -> Result<Option<Vec<u8>>, sigrefs::git::object::error::ReadCommit> {
- self.backend.read_commit(oid)
- }
-
- fn read_blob(
- &self,
- commit: &Oid,
- path: &Path,
- ) -> Result<Option<sigrefs::git::object::Blob>, sigrefs::git::object::error::ReadBlob> {
- self.backend.read_blob(commit, path)
- }
-}
-
-impl sigrefs::git::object::Writer for Repository {
- fn write_tree(
- &self,
- refs: sigrefs::git::object::RefsEntry,
- signature: sigrefs::git::object::SignatureEntry,
- ) -> Result<Oid, sigrefs::git::object::error::WriteTree> {
- self.backend.write_tree(refs, signature)
- }
-
- fn write_commit(&self, bytes: &[u8]) -> Result<Oid, sigrefs::git::object::error::WriteCommit> {
- self.backend.write_commit(bytes)
- }
-}
-
-impl sigrefs::git::reference::Reader for Repository {
- fn find_reference(
- &self,
- reference: &git::fmt::Namespaced,
- ) -> Result<Option<Oid>, sigrefs::git::reference::error::FindReference> {
- sigrefs::git::reference::Reader::find_reference(&self.backend, reference)
- }
-}
-
-impl sigrefs::git::reference::Writer for Repository {
- fn write_reference(
- &self,
- reference: &git::fmt::Namespaced,
- commit: Oid,
- parent: Option<Oid>,
- reflog: String,
- ) -> Result<(), sigrefs::git::reference::error::WriteReference> {
- self.backend
- .write_reference(reference, commit, parent, reflog)
- }
-}
-
impl object::Reader for Repository {
fn blob(&self, oid: Oid) -> Result<Option<git::repository::Blob>, object::error::read::Blob> {
object::Reader::blob(&self.backend, oid)
diff --git a/crates/radicle/src/storage/refs/sigrefs/git.rs b/crates/radicle/src/storage/refs/sigrefs/git.rs
index 2a0ab3c6e..ea762c6ec 100644
--- a/crates/radicle/src/storage/refs/sigrefs/git.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/git.rs
@@ -1,9 +1,9 @@
-//! Signed References are encoded in the Git commit graph.
-//! This module provides traits for interacting with a Git
-//! repository to read and write data for Signed References.
+//! Domain data for creating signed reference updates.
+//!
+//! [`Committer`] is used for the author of the commit in a signed references commit.
+//! It provides a way to create a stable author and timestamp for deterministic commits.
-pub mod object;
-pub mod reference;
+use std::path::Path;
#[cfg(test)]
mod properties;
@@ -12,6 +12,46 @@ use crypto::PublicKey;
use radicle_git_metadata::author::Author;
use radicle_git_metadata::author::Time;
+use crate::git::repository::types::TreeEntry;
+
+/// A [`TreeEntry`] for the signed references payload blob.
+#[derive(Clone, Debug, PartialEq, Eq, Hash)]
+pub(super) struct RefsEntry(TreeEntry);
+
+impl RefsEntry {
+ /// Create a new entry with the canonical refs bytes.
+ pub fn new(content: Vec<u8>) -> Self {
+ Self(TreeEntry::Blob {
+ path: Path::new(crate::storage::refs::REFS_BLOB_PATH).into(),
+ content,
+ })
+ }
+
+ /// Unwrap into the underlying [`TreeEntry`].
+ pub fn into_inner(self) -> TreeEntry {
+ self.0
+ }
+}
+
+/// A [`TreeEntry`] for the cryptographic signature blob.
+#[derive(Clone, Debug, PartialEq, Eq, Hash)]
+pub(super) struct SignatureEntry(TreeEntry);
+
+impl SignatureEntry {
+ /// Create a new entry with the signature bytes.
+ pub fn new(content: Vec<u8>) -> Self {
+ Self(TreeEntry::Blob {
+ path: Path::new(crate::storage::refs::SIGNATURE_BLOB_PATH).into(),
+ content,
+ })
+ }
+
+ /// Unwrap into the underlying [`TreeEntry`].
+ pub fn into_inner(self) -> TreeEntry {
+ self.0
+ }
+}
+
/// Convenience type that corresponds to an [`Author`].
///
/// Most users will want to instantiate this via [`Committer::from_env_or_now`],
@@ -105,142 +145,3 @@ impl Committer {
})
}
}
-
-mod git2_impls {
- //! [`git2::Repository`] implementations of the [`object`] and [`reference`] traits.
- //!
- //! [`object`]: super::object
- //! [`reference`]: super::reference
-
- use std::path::Path;
-
- use radicle_oid::Oid;
-
- use crate::git;
-
- use super::object;
- use super::object::{RefsEntry, SignatureEntry};
- use super::reference;
-
- impl object::Reader for git2::Repository {
- fn read_commit(&self, oid: &Oid) -> Result<Option<Vec<u8>>, object::error::ReadCommit> {
- use object::error::ReadCommit;
-
- let odb = self.odb().map_err(ReadCommit::other)?;
- let object = odb.read(git2::Oid::from(*oid));
- match object {
- Ok(object) => {
- if object.kind() != git2::ObjectType::Commit {
- return Err(ReadCommit::incorrect_object_error(*oid, object.kind()));
- }
- Ok(Some(object.data().to_vec()))
- }
- Err(e) if e.code() == git2::ErrorCode::NotFound => Ok(None),
- Err(e) => Err(ReadCommit::other(e)),
- }
- }
-
- fn read_blob(
- &self,
- oid: &Oid,
- path: &Path,
- ) -> Result<Option<object::Blob>, object::error::ReadBlob> {
- use object::error::ReadBlob;
-
- let commit = match self.find_commit(git2::Oid::from(*oid)) {
- Ok(c) => c,
- Err(e) if e.code() == git2::ErrorCode::NotFound => {
- return Err(ReadBlob::commit_not_found_error(*oid));
- }
- Err(e) => return Err(ReadBlob::other(e)),
- };
-
- let tree = commit.tree().map_err(ReadBlob::other)?;
-
- let entry = match tree.get_path(path) {
- Ok(e) => e,
- Err(e) if e.code() == git2::ErrorCode::NotFound => return Ok(None),
- Err(e) => return Err(ReadBlob::other(e)),
- };
-
- let object = entry.to_object(self).map_err(ReadBlob::other)?;
- let blob = object.as_blob().ok_or(ReadBlob::incorrect_object_error(
- *oid,
- path.to_path_buf(),
- object.kind().unwrap_or(git2::ObjectType::Any),
- ))?;
-
- Ok(Some(object::Blob {
- oid: blob.id().into(),
- bytes: blob.content().to_vec(),
- }))
- }
- }
-
- impl object::Writer for git2::Repository {
- fn write_tree(
- &self,
- refs: RefsEntry,
- signature: SignatureEntry,
- ) -> Result<Oid, object::error::WriteTree> {
- crate::git::repository::object::Writer::write_tree(
- self,
- &[refs.into_inner(), signature.into_inner()],
- )
- .map_err(|e| object::error::WriteTree::Write(Box::new(e)))
- }
-
- fn write_commit(&self, bytes: &[u8]) -> Result<Oid, object::error::WriteCommit> {
- use object::error::WriteCommit;
-
- let odb = self.odb().map_err(WriteCommit::other)?;
-
- let oid = odb
- .write(git2::ObjectType::Commit, bytes)
- .map_err(WriteCommit::other)?;
-
- Ok(Oid::from(oid))
- }
- }
-
- impl reference::Reader for git2::Repository {
- fn find_reference(
- &self,
- reference: &git::fmt::Namespaced,
- ) -> Result<Option<Oid>, reference::error::FindReference> {
- match self.refname_to_id(reference.as_str()) {
- Ok(oid) => Ok(Some(Oid::from(oid))),
- Err(e) if e.code() == git2::ErrorCode::NotFound => Ok(None),
- Err(e) => Err(reference::error::FindReference::other(e)),
- }
- }
- }
-
- impl reference::Writer for git2::Repository {
- fn write_reference(
- &self,
- reference: &git::fmt::Namespaced,
- commit: Oid,
- parent: Option<Oid>,
- reflog: String,
- ) -> Result<(), reference::error::WriteReference> {
- let new = git2::Oid::from(commit);
-
- match parent {
- Some(parent) => {
- let old = git2::Oid::from(parent);
- // The old OID provides a guard, which gives us a compare-and-swap —
- // the write will fail if the ref has moved since we read it.
- self.reference_matching(reference.as_str(), new, true, old, &reflog)
- .map_err(reference::error::WriteReference::other)?;
- }
- None => {
- self.reference(reference.as_str(), new, false, &reflog)
- .map_err(reference::error::WriteReference::other)?;
- }
- }
-
- Ok(())
- }
- }
-}
diff --git a/crates/radicle/src/storage/refs/sigrefs/git/object.rs b/crates/radicle/src/storage/refs/sigrefs/git/object.rs
deleted file mode 100644
index b98d84c29..000000000
--- a/crates/radicle/src/storage/refs/sigrefs/git/object.rs
+++ /dev/null
@@ -1,116 +0,0 @@
-//! Traits for interacting with Git objects, necessary for implementing Radicle
-//! Signed References.
-// TODO(finto): I think these are more generally useful than just being used for
-// Signed References. They might be worth moving into a crate,
-// `radicle-git-traits`, but for now they can live here.
-
-pub mod error;
-
-use std::path::Path;
-
-use radicle_oid::Oid;
-
-use crate::git::repository::types::TreeEntry;
-
-/// A Git blob object, returned by [`Reader::read_blob`].
-pub struct Blob {
- /// The [`Oid`] of the Git blob.
- pub oid: Oid,
- /// The contents of the Git blob.
- pub bytes: Vec<u8>,
-}
-
-/// Git object reader, generally a Git repository, or its corresponding Object
-/// Database (ODB).
-pub trait Reader {
- /// Read the raw bytes of a commit object identified by `oid`.
- ///
- /// Returns `None` if no such object exists.
- ///
- /// # Errors
- ///
- /// - [`error::ReadCommit::IncorrectObject`]: the object identified by the
- /// [`Oid`] was found, but was not a commit.
- /// - [`error::ReadCommit::Other`]: failed to read the Git commit.
- fn read_commit(&self, oid: &Oid) -> Result<Option<Vec<u8>>, error::ReadCommit>;
-
- /// Read the raw bytes of the blob at `path` within the tree of `commit`.
- ///
- /// Returns `None` if the path does not exist in that tree.
- ///
- /// # Errors
- ///
- /// - [`error::ReadBlob::CommitNotFound`]: failed to find the commit
- /// identified by the [`Oid`].
- /// - [`error::ReadBlob::IncorrectObject`]: the object identified by the
- /// [`Oid`] was found, but was not a commit.
- /// - [`error::ReadBlob::Other`]: failed to read the Git blob.
- fn read_blob(&self, commit: &Oid, path: &Path) -> Result<Option<Blob>, error::ReadBlob>;
-}
-
-/// A [`TreeEntry`] for the signed references payload blob.
-#[derive(Clone, Debug, PartialEq, Eq, Hash)]
-pub struct RefsEntry(TreeEntry);
-
-impl RefsEntry {
- /// Create a new entry with the canonical refs bytes.
- pub fn new(content: Vec<u8>) -> Self {
- Self(TreeEntry::Blob {
- path: Path::new(crate::storage::refs::REFS_BLOB_PATH).into(),
- content,
- })
- }
-
- /// Unwrap into the underlying [`TreeEntry`].
- pub fn into_inner(self) -> TreeEntry {
- self.0
- }
-}
-
-/// A [`TreeEntry`] for the cryptographic signature blob.
-#[derive(Clone, Debug, PartialEq, Eq, Hash)]
-pub struct SignatureEntry(TreeEntry);
-
-impl SignatureEntry {
- /// Create a new entry with the signature bytes.
- pub fn new(content: Vec<u8>) -> Self {
- Self(TreeEntry::Blob {
- path: Path::new(crate::storage::refs::SIGNATURE_BLOB_PATH).into(),
- content,
- })
- }
-
- /// Unwrap into the underlying [`TreeEntry`].
- pub fn into_inner(self) -> TreeEntry {
- self.0
- }
-}
-
-/// Git object writer, generally a Git repository, or its corresponding Object
-/// Database (ODB).
-pub trait Writer {
- /// Write the [`RefsEntry`] and [`SignatureEntry`] to two separate Git blobs
- /// within a shared Git tree.
- ///
- /// Returns the [`Oid`] of the Git tree.
- ///
- /// # Errors
- ///
- /// - [`error::WriteTree::Refs`]: failed to write the references Git blob.
- /// - [`error::WriteTree::Signature`]: failed to write the signature Git blob.
- /// - [`error::WriteTree::Write`]: failed to write the Git tree.
- fn write_tree(
- &self,
- refs: RefsEntry,
- signature: SignatureEntry,
- ) -> Result<Oid, error::WriteTree>;
-
- /// Write the given Git commit, as bytes, to the Git object database.
- ///
- /// Returns the [`Oid`] of the Git commit.
- ///
- /// # Errors
- ///
- /// - [`error::WriteCommit`]: failed to write the Git commit.
- fn write_commit(&self, bytes: &[u8]) -> Result<Oid, error::WriteCommit>;
-}
diff --git a/crates/radicle/src/storage/refs/sigrefs/git/object/error.rs b/crates/radicle/src/storage/refs/sigrefs/git/object/error.rs
deleted file mode 100644
index 583048d5c..000000000
--- a/crates/radicle/src/storage/refs/sigrefs/git/object/error.rs
+++ /dev/null
@@ -1,146 +0,0 @@
-use std::path::PathBuf;
-
-use radicle_oid::Oid;
-use thiserror::Error;
-
-type StdError = dyn std::error::Error + Send + Sync + 'static;
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-pub enum ReadCommit {
- #[error(transparent)]
- IncorrectObject(NotCommit),
- #[error(transparent)]
- Other(Box<StdError>),
-}
-
-impl ReadCommit {
- pub fn incorrect_object_error<K>(oid: Oid, kind: K) -> Self
- where
- K: ToString,
- {
- Self::IncorrectObject(NotCommit {
- oid,
- kind: kind.to_string(),
- })
- }
-
- pub fn other<E>(err: E) -> Self
- where
- E: std::error::Error + Send + Sync + 'static,
- {
- Self::Other(Box::new(err))
- }
-}
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-#[error("the object {oid} is a {kind}, not a commit")]
-pub struct NotCommit {
- oid: Oid,
- kind: String,
-}
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-#[error(transparent)]
-pub enum ReadBlob {
- #[error(transparent)]
- CommitNotFound(CommitNotFound),
- #[error(transparent)]
- IncorrectObject(NotBlob),
- #[error(transparent)]
- Other(Box<StdError>),
-}
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-#[error("could not find commit {oid}")]
-pub struct CommitNotFound {
- oid: Oid,
-}
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-#[error("the object at {path:?} in commit {commit} is a {kind}, not a blob")]
-pub struct NotBlob {
- commit: Oid,
- path: PathBuf,
- kind: String,
-}
-
-impl ReadBlob {
- pub fn commit_not_found_error(oid: Oid) -> Self {
- Self::CommitNotFound(CommitNotFound { oid })
- }
-
- pub fn incorrect_object_error<K>(commit: Oid, path: PathBuf, kind: K) -> Self
- where
- K: ToString,
- {
- Self::IncorrectObject(NotBlob {
- commit,
- path,
- kind: kind.to_string(),
- })
- }
-
- pub fn other<E>(err: E) -> Self
- where
- E: std::error::Error + Send + Sync + 'static,
- {
- Self::Other(Box::new(err))
- }
-}
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-pub enum WriteTree {
- #[error("failed to write reference blob for signed references")]
- Refs(Box<StdError>),
- #[error("failed to write signature blob for signed references")]
- Signature(Box<StdError>),
- #[error(transparent)]
- Write(Box<StdError>),
-}
-
-impl WriteTree {
- pub fn refs_error<E>(err: E) -> Self
- where
- E: std::error::Error + Send + Sync + 'static,
- {
- Self::Refs(Box::new(err))
- }
-
- pub fn signature_error<E>(err: E) -> Self
- where
- E: std::error::Error + Send + Sync + 'static,
- {
- Self::Signature(Box::new(err))
- }
-
- pub fn write_error<E>(err: E) -> Self
- where
- E: std::error::Error + Send + Sync + 'static,
- {
- Self::Write(Box::new(err))
- }
-}
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-#[error(transparent)]
-pub struct WriteCommit {
- source: Box<StdError>,
-}
-
-impl WriteCommit {
- pub fn other<E>(err: E) -> Self
- where
- E: std::error::Error + Send + Sync + 'static,
- {
- Self {
- source: Box::new(err),
- }
- }
-}
diff --git a/crates/radicle/src/storage/refs/sigrefs/git/reference.rs b/crates/radicle/src/storage/refs/sigrefs/git/reference.rs
deleted file mode 100644
index 4f46c829a..000000000
--- a/crates/radicle/src/storage/refs/sigrefs/git/reference.rs
+++ /dev/null
@@ -1,51 +0,0 @@
-//! Traits for interacting with Git references, necessary for implementing
-//! Radicle Signed References.
-// TODO(finto): I think these are more generally useful than just being used for
-// Signed References. They might be worth moving into a crate,
-// `radicle-git-traits`, but for now they can live here.
-
-pub mod error;
-
-use radicle_oid::Oid;
-
-use crate::git;
-
-/// Git reference reader, generally a Git repository, or its corresponding Reference
-/// Database (Ref DB).
-pub trait Reader {
- /// Find the head [`Oid`] of the sigrefs reference for the given namespace.
- ///
- /// Returns `None` if the reference does not yet exist.
- /// # Errors
- ///
- /// - [`error::FindReference`]: failed to write the Git reference.
- fn find_reference(
- &self,
- reference: &git::fmt::Namespaced,
- ) -> Result<Option<Oid>, error::FindReference>;
-}
-
-/// Git reference writer, generally a Git repository, or its corresponding Reference
-/// Database (Ref DB).
-pub trait Writer {
- /// Write the given commit [`Oid`], and its parent, to the given
- /// `reference`.
- ///
- /// The `reflog` given can used as the Git reflog message of the reference.
- ///
- /// # Concurrency
- ///
- /// It is up to the implementer to ensure the safety of writing the
- /// reference safely in a concurrent environment.
- ///
- /// # Errors
- ///
- /// - [`error::WriteReference`]: failed to write the Git reference.
- fn write_reference(
- &self,
- reference: &git::fmt::Namespaced,
- commit: Oid,
- parent: Option<Oid>,
- reflog: String,
- ) -> Result<(), error::WriteReference>;
-}
diff --git a/crates/radicle/src/storage/refs/sigrefs/git/reference/error.rs b/crates/radicle/src/storage/refs/sigrefs/git/reference/error.rs
deleted file mode 100644
index cd6af9fd6..000000000
--- a/crates/radicle/src/storage/refs/sigrefs/git/reference/error.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-use thiserror::Error;
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-#[error(transparent)]
-pub struct FindReference(Box<dyn std::error::Error + Send + Sync + 'static>);
-
-impl FindReference {
- pub fn other<E>(err: E) -> Self
- where
- E: std::error::Error + Send + Sync + 'static,
- {
- Self(Box::new(err))
- }
-}
-
-#[derive(Debug, Error)]
-#[non_exhaustive]
-#[error(transparent)]
-pub struct WriteReference(Box<dyn std::error::Error + Send + Sync + 'static>);
-
-impl WriteReference {
- pub fn other<E>(err: E) -> Self
- where
- E: std::error::Error + Send + Sync + 'static,
- {
- Self(Box::new(err))
- }
-}
diff --git a/crates/radicle/src/storage/refs/sigrefs/write.rs b/crates/radicle/src/storage/refs/sigrefs/write.rs
index 341923721..5a7bd4325 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write.rs
@@ -19,7 +19,7 @@ use crate::storage::refs::sigrefs::read::CommitReader;
use crate::storage::refs::sigrefs::{VerifiedCommit, read};
use crate::storage::refs::{FeatureLevel, IDENTITY_ROOT, Refs, SIGREFS_BRANCH, SIGREFS_PARENT};
-use super::git::object::{RefsEntry, SignatureEntry};
+use super::git::{RefsEntry, SignatureEntry};
/// The result of attempting to write signed references using
/// [`SignedRefsWriter`].
commit 8e27fd9b28032e390ec0ecdcfbc22560be1abd56
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 14 12:18:57 2026 +0000
storage/refs/sigrefs: Refactor reference::Writer to repository::reference::Writer
Replace the sigrefs-specific reference::Writer trait with the shared
git::repository::reference::Writer for all sigrefs handlers.
The `write_reference` method is replaced by `write_ref` using:
* `RefTarget::Cas` when the commit has a parent. This ensures that the
parent value is not modified when updating in concurrent
environments.
* `RefTarget::Create` when there is no parent, i.e. it is the first
commit of the `rad/sigrefs` reference.
The mock RefWriter impl uses unimplemented!() for `delete_ref`.
diff --git a/crates/radicle/src/storage/refs.rs b/crates/radicle/src/storage/refs.rs
index 6e5fbb140..cec31f072 100644
--- a/crates/radicle/src/storage/refs.rs
+++ b/crates/radicle/src/storage/refs.rs
@@ -19,7 +19,7 @@ use thiserror::Error;
use crate::git;
use crate::git::Oid;
use crate::git::raw::ErrorExt as _;
-use crate::git::repository;
+use crate::git::repository::{object, reference};
use crate::storage;
use crate::storage::RemoteId;
use crate::storage::refs::sigrefs::read::Tip;
@@ -79,8 +79,8 @@ impl Refs {
signer: &S,
) -> Result<SignedRefs, Error>
where
- R: repository::object::Reader + repository::object::Writer,
- R: repository::reference::Reader + sigrefs::git::reference::Writer,
+ R: object::Reader + object::Writer,
+ R: reference::Reader + reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
@@ -97,8 +97,8 @@ impl Refs {
signer: &S,
) -> Result<SignedRefs, Error>
where
- R: repository::object::Reader + repository::object::Writer,
- R: repository::reference::Reader + sigrefs::git::reference::Writer,
+ R: object::Reader + object::Writer,
+ R: reference::Reader + reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
@@ -115,8 +115,8 @@ impl Refs {
force: bool,
) -> Result<SignedRefs, Error>
where
- R: repository::object::Reader + repository::object::Writer,
- R: repository::reference::Reader + sigrefs::git::reference::Writer,
+ R: object::Reader + object::Writer,
+ R: reference::Reader + reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
@@ -349,7 +349,7 @@ pub struct RefsAt {
impl RefsAt {
pub fn new<R>(repo: &R, remote: RemoteId) -> Result<Self, sigrefs::read::error::Read>
where
- R: repository::reference::Reader,
+ R: reference::Reader,
{
let at = repo
.ref_target(
@@ -426,7 +426,7 @@ impl SignedRefs {
pub fn load<R>(remote: RemoteId, repo: &R) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: repository::object::Reader + repository::reference::Reader,
+ R: object::Reader + reference::Reader,
{
Self::load_internal(remote, repo, sigrefs::read::Tip::Reference(remote))
}
@@ -438,7 +438,7 @@ impl SignedRefs {
) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: repository::object::Reader + repository::reference::Reader,
+ R: object::Reader + reference::Reader,
{
Self::load_internal(remote, repo, sigrefs::read::Tip::Commit(oid))
}
@@ -450,7 +450,7 @@ impl SignedRefs {
) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: repository::object::Reader + repository::reference::Reader,
+ R: object::Reader + reference::Reader,
{
let root = repo.rid();
match sigrefs::SignedRefsReader::new(root, tip, repo, &remote).read() {
diff --git a/crates/radicle/src/storage/refs/sigrefs/write.rs b/crates/radicle/src/storage/refs/sigrefs/write.rs
index 612572a56..341923721 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write.rs
@@ -12,9 +12,9 @@ use radicle_oid::Oid;
use crate::git;
use crate::git::repository;
-use crate::git::repository::object;
+use crate::git::repository::{object, reference};
use crate::storage::refs::SignedRefs;
-use crate::storage::refs::sigrefs::git::{Committer, reference};
+use crate::storage::refs::sigrefs::git::Committer;
use crate::storage::refs::sigrefs::read::CommitReader;
use crate::storage::refs::sigrefs::{VerifiedCommit, read};
use crate::storage::refs::{FeatureLevel, IDENTITY_ROOT, Refs, SIGREFS_BRANCH, SIGREFS_PARENT};
@@ -71,7 +71,13 @@ pub struct SignedRefsWriter<'a, R, S> {
impl<'a, R, S> SignedRefsWriter<'a, R, S>
where
- R: object::Writer + object::Reader + reference::Writer + repository::reference::Reader,
+ R: object::Writer
+ + object::Writer
+ + object::Reader
+ + object::Reader
+ + reference::Writer
+ + repository::reference::Reader
+ + reference::Reader,
S: Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
{
@@ -178,8 +184,12 @@ where
Err(err) => return Err(error::Write::Head(err)),
};
let commit = commit_writer.write().map_err(error::Write::Commit)?;
+ let target = match commit.parent {
+ Some(expected) => reference::Target::cas(commit.oid, expected),
+ None => reference::Target::create(commit.oid),
+ };
repository
- .write_reference(&reference, commit.oid, commit.parent, reflog)
+ .write_ref(&reference, target, &reflog)
.map_err(error::Write::Reference)?;
Ok(Update::changed(commit, FeatureLevel::Parent))
}
diff --git a/crates/radicle/src/storage/refs/sigrefs/write/error.rs b/crates/radicle/src/storage/refs/sigrefs/write/error.rs
index 18f1102e9..5e3234e09 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write/error.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write/error.rs
@@ -1,9 +1,8 @@
use radicle_oid::Oid;
use thiserror::Error;
-use crate::git::repository;
use crate::git::repository::object;
-use crate::storage::refs::sigrefs::git::reference;
+use crate::git::repository::reference;
// TODO: use commit NID (and RID?) for traceability
#[derive(Debug, Error)]
@@ -14,7 +13,7 @@ pub enum Write {
#[error(transparent)]
Commit(Commit),
#[error(transparent)]
- Reference(reference::error::WriteReference),
+ Reference(reference::error::write::WriteRef),
}
// TODO: use commit OID for traceability
@@ -43,7 +42,7 @@ pub enum Tree {
#[error(transparent)]
pub enum Head {
#[error(transparent)]
- Reference(repository::reference::error::read::RefTarget),
+ Reference(reference::error::read::RefTarget),
#[error(transparent)]
Commit(super::read::error::Commit),
#[error("failed to verify commit {commit}: {source}")]
diff --git a/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs b/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
index 2d7f22164..9054dee2a 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
@@ -10,12 +10,11 @@ use radicle_git_metadata::commit::trailers::OwnedTrailer;
use radicle_oid::Oid;
use crate::git;
-use crate::git::repository;
use crate::git::repository::object;
+use crate::git::repository::reference;
use crate::git::repository::types::{Blob, Commit, TreeEntry};
use crate::identity::doc;
use crate::storage::HasRepoId;
-use crate::storage::refs::sigrefs::git::reference;
use crate::storage::refs::{REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH};
const MOCKED_IDENTITY: u8 = 99u8;
@@ -31,9 +30,9 @@ enum WriteTreeBehavior {
struct WriteCommitBehavior(Oid);
enum WriteReferenceBehavior {
- /// [`reference::Writer::write_reference`] returns `Ok(())`.
+ /// [`RefWriter::write_ref`] returns `Ok(())`.
Ok,
- /// [`reference::Writer::write_reference`] returns `Err(…)`.
+ /// [`RefWriter::write_ref`] returns `Err(…)`.
Error,
}
@@ -243,33 +242,28 @@ impl object::Reader for MockRepository {
}
}
-impl repository::reference::Reader for MockRepository {
+impl reference::Reader for MockRepository {
type References<'a> = std::iter::Empty<
- Result<
- (git::fmt::Qualified<'static>, Oid),
- repository::reference::error::read::ListReference,
- >,
+ Result<(git::fmt::Qualified<'static>, Oid), reference::error::read::ListReference>,
>;
fn ref_target<R: AsRef<git::fmt::RefStr>>(
&self,
name: &R,
- ) -> Result<Option<Oid>, repository::reference::error::read::RefTarget> {
+ ) -> Result<Option<Oid>, reference::error::read::RefTarget> {
match self.references.get(name.as_ref().as_str()) {
Some(RefBehavior::Present(oid)) => Ok(Some(*oid)),
Some(RefBehavior::Missing) | None => Ok(None),
- Some(RefBehavior::Error) => {
- Err(repository::reference::error::read::RefTarget::backend(
- std::io::Error::other("mock reference error"),
- ))
- }
+ Some(RefBehavior::Error) => Err(reference::error::read::RefTarget::backend(
+ std::io::Error::other("mock reference error"),
+ )),
}
}
fn list_refs<'a, P: AsRef<git::fmt::refspec::PatternStr>>(
&'a self,
_pattern: &P,
- ) -> Result<Self::References<'a>, repository::reference::error::read::ListRefs> {
+ ) -> Result<Self::References<'a>, reference::error::read::ListRefs> {
unimplemented!("MockRepository::list_refs")
}
}
@@ -299,22 +293,28 @@ impl object::Writer for MockRepository {
}
impl reference::Writer for MockRepository {
- fn write_reference(
+ fn write_ref<R: AsRef<git::fmt::RefStr>>(
&self,
- _reference: &git::fmt::Namespaced,
- _commit: Oid,
- _parent: Option<Oid>,
- _reflog: String,
- ) -> Result<(), reference::error::WriteReference> {
+ _name: &R,
+ _target: reference::Target,
+ _reflog: &str,
+ ) -> Result<(), reference::error::write::WriteRef> {
match &self.write_reference {
Some(WriteReferenceBehavior::Ok) => Ok(()),
Some(WriteReferenceBehavior::Error) | None => {
- Err(reference::error::WriteReference::other(
- std::io::Error::other("mock write_reference error"),
+ Err(reference::error::write::WriteRef::backend(
+ std::io::Error::other("mock write_ref error"),
))
}
}
}
+
+ fn delete_ref<R: AsRef<git::fmt::RefStr>>(
+ &self,
+ _name: &R,
+ ) -> Result<(), reference::error::write::DeleteRef> {
+ unimplemented!("MockRepository::delete_ref")
+ }
}
/// Always signs successfully, returning a fixed 64-byte signature.
commit e84e10abf81e88309bf38a0d0d7c49ee7e9ec5bf
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 14 12:18:57 2026 +0000
storage/refs/sigrefs: Refactor object::Writer to repository::object::Writer
Replace the sigrefs-specific object::Writer trait with the shared
git::repository::object::Writer trait across all sigrefs handlers.
Notably, `RefsEntry` and `SignatureEntry` become newtype wrappers
around `TreeEntry`, with constructors that embed the canonical paths
`REFS_BLOB_PATH` and `SIGNATURE_BLOB_PATH`, respectively.
diff --git a/crates/radicle/src/storage/refs.rs b/crates/radicle/src/storage/refs.rs
index f189ff467..6e5fbb140 100644
--- a/crates/radicle/src/storage/refs.rs
+++ b/crates/radicle/src/storage/refs.rs
@@ -79,7 +79,7 @@ impl Refs {
signer: &S,
) -> Result<SignedRefs, Error>
where
- R: repository::object::Reader + sigrefs::git::object::Writer,
+ R: repository::object::Reader + repository::object::Writer,
R: repository::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
@@ -97,7 +97,7 @@ impl Refs {
signer: &S,
) -> Result<SignedRefs, Error>
where
- R: repository::object::Reader + sigrefs::git::object::Writer,
+ R: repository::object::Reader + repository::object::Writer,
R: repository::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
@@ -115,7 +115,7 @@ impl Refs {
force: bool,
) -> Result<SignedRefs, Error>
where
- R: repository::object::Reader + sigrefs::git::object::Writer,
+ R: repository::object::Reader + repository::object::Writer,
R: repository::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
diff --git a/crates/radicle/src/storage/refs/sigrefs/git.rs b/crates/radicle/src/storage/refs/sigrefs/git.rs
index 4b1c7d6bc..2a0ab3c6e 100644
--- a/crates/radicle/src/storage/refs/sigrefs/git.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/git.rs
@@ -183,31 +183,11 @@ mod git2_impls {
refs: RefsEntry,
signature: SignatureEntry,
) -> Result<Oid, object::error::WriteTree> {
- use object::error::WriteTree;
-
- let odb = self.odb().map_err(WriteTree::write_error)?;
-
- let refs_oid = odb
- .write(git2::ObjectType::Blob, &refs.content)
- .map_err(WriteTree::refs_error)?;
-
- let sig_oid = odb
- .write(git2::ObjectType::Blob, &signature.content)
- .map_err(WriteTree::signature_error)?;
-
- let mut builder = self.treebuilder(None).map_err(WriteTree::write_error)?;
-
- builder
- .insert(&refs.path, refs_oid, git2::FileMode::Blob.into())
- .map_err(WriteTree::refs_error)?;
-
- builder
- .insert(&signature.path, sig_oid, git2::FileMode::Blob.into())
- .map_err(WriteTree::signature_error)?;
-
- let tree_oid = builder.write().map_err(WriteTree::write_error)?;
-
- Ok(Oid::from(tree_oid))
+ crate::git::repository::object::Writer::write_tree(
+ self,
+ &[refs.into_inner(), signature.into_inner()],
+ )
+ .map_err(|e| object::error::WriteTree::Write(Box::new(e)))
}
fn write_commit(&self, bytes: &[u8]) -> Result<Oid, object::error::WriteCommit> {
diff --git a/crates/radicle/src/storage/refs/sigrefs/git/object.rs b/crates/radicle/src/storage/refs/sigrefs/git/object.rs
index f997314af..b98d84c29 100644
--- a/crates/radicle/src/storage/refs/sigrefs/git/object.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/git/object.rs
@@ -6,10 +6,12 @@
pub mod error;
-use std::path::{Path, PathBuf};
+use std::path::Path;
use radicle_oid::Oid;
+use crate::git::repository::types::TreeEntry;
+
/// A Git blob object, returned by [`Reader::read_blob`].
pub struct Blob {
/// The [`Oid`] of the Git blob.
@@ -46,30 +48,42 @@ pub trait Reader {
fn read_blob(&self, commit: &Oid, path: &Path) -> Result<Option<Blob>, error::ReadBlob>;
}
-/// Input to the [`Writer::write_tree`] method.
-///
-/// The entry describes where in the Git tree to write the [`Refs`] content
-/// blob.
-///
-/// [`Refs`]: crate::storage::refs::Refs
+/// A [`TreeEntry`] for the signed references payload blob.
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
-pub struct RefsEntry {
- /// Path in the Git tree to write to.
- pub path: PathBuf,
- /// The contents of the Git blob.
- pub content: Vec<u8>,
+pub struct RefsEntry(TreeEntry);
+
+impl RefsEntry {
+ /// Create a new entry with the canonical refs bytes.
+ pub fn new(content: Vec<u8>) -> Self {
+ Self(TreeEntry::Blob {
+ path: Path::new(crate::storage::refs::REFS_BLOB_PATH).into(),
+ content,
+ })
+ }
+
+ /// Unwrap into the underlying [`TreeEntry`].
+ pub fn into_inner(self) -> TreeEntry {
+ self.0
+ }
}
-/// Input to the [`Writer::write_tree`] method.
-///
-/// The entry describes where in the Git tree to write the signature content
-/// blob.
+/// A [`TreeEntry`] for the cryptographic signature blob.
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
-pub struct SignatureEntry {
- /// Path in the Git tree to write to.
- pub path: PathBuf,
- /// The contents of the Git blob.
- pub content: Vec<u8>,
+pub struct SignatureEntry(TreeEntry);
+
+impl SignatureEntry {
+ /// Create a new entry with the signature bytes.
+ pub fn new(content: Vec<u8>) -> Self {
+ Self(TreeEntry::Blob {
+ path: Path::new(crate::storage::refs::SIGNATURE_BLOB_PATH).into(),
+ content,
+ })
+ }
+
+ /// Unwrap into the underlying [`TreeEntry`].
+ pub fn into_inner(self) -> TreeEntry {
+ self.0
+ }
}
/// Git object writer, generally a Git repository, or its corresponding Object
diff --git a/crates/radicle/src/storage/refs/sigrefs/write.rs b/crates/radicle/src/storage/refs/sigrefs/write.rs
index 6f2da6ac6..612572a56 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write.rs
@@ -3,8 +3,6 @@ pub mod error;
#[cfg(test)]
mod test;
-use std::path::Path;
-
use crypto::PublicKey;
use crypto::signature::{self, Signer};
use radicle_core::{NodeId, RepoId};
@@ -14,14 +12,14 @@ use radicle_oid::Oid;
use crate::git;
use crate::git::repository;
+use crate::git::repository::object;
use crate::storage::refs::SignedRefs;
-use crate::storage::refs::sigrefs::git::{Committer, object, reference};
+use crate::storage::refs::sigrefs::git::{Committer, reference};
use crate::storage::refs::sigrefs::read::CommitReader;
use crate::storage::refs::sigrefs::{VerifiedCommit, read};
-use crate::storage::refs::{
- FeatureLevel, IDENTITY_ROOT, REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH,
- SIGREFS_PARENT,
-};
+use crate::storage::refs::{FeatureLevel, IDENTITY_ROOT, Refs, SIGREFS_BRANCH, SIGREFS_PARENT};
+
+use super::git::object::{RefsEntry, SignatureEntry};
/// The result of attempting to write signed references using
/// [`SignedRefsWriter`].
@@ -73,10 +71,7 @@ pub struct SignedRefsWriter<'a, R, S> {
impl<'a, R, S> SignedRefsWriter<'a, R, S>
where
- R: object::Writer
- + repository::object::Reader
- + reference::Writer
- + repository::reference::Reader,
+ R: object::Writer + object::Reader + reference::Writer + repository::reference::Reader,
S: Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
{
@@ -336,17 +331,11 @@ where
.signer
.try_sign(&canonical)
.map_err(error::Tree::Sign)?;
- let refs = object::RefsEntry {
- path: Path::new(REFS_BLOB_PATH).to_path_buf(),
- content: canonical,
- };
- let sig = object::SignatureEntry {
- path: Path::new(SIGNATURE_BLOB_PATH).to_path_buf(),
- content: signature.to_vec(),
- };
+ let refs = RefsEntry::new(canonical);
+ let sig = SignatureEntry::new(signature.to_vec());
let oid = self
.repository
- .write_tree(refs, sig)
+ .write_tree(&[refs.into_inner(), sig.into_inner()])
.map_err(error::Tree::Write)?;
Ok(Tree {
oid,
diff --git a/crates/radicle/src/storage/refs/sigrefs/write/error.rs b/crates/radicle/src/storage/refs/sigrefs/write/error.rs
index 10e4ea9d5..18f1102e9 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write/error.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write/error.rs
@@ -2,7 +2,8 @@ use radicle_oid::Oid;
use thiserror::Error;
use crate::git::repository;
-use crate::storage::refs::sigrefs::git::{object, reference};
+use crate::git::repository::object;
+use crate::storage::refs::sigrefs::git::reference;
// TODO: use commit NID (and RID?) for traceability
#[derive(Debug, Error)]
@@ -23,7 +24,7 @@ pub enum Commit {
#[error(transparent)]
Tree(Tree),
#[error(transparent)]
- Write(object::error::WriteCommit),
+ Write(object::error::write::Commit),
}
// TODO: use commit OID for traceability
@@ -33,7 +34,7 @@ pub enum Tree {
#[error("failed to sign references payload")]
Sign(crypto::signature::Error),
#[error(transparent)]
- Write(object::error::WriteTree),
+ Write(object::error::write::Tree),
}
// TODO: use commit OID for traceability
diff --git a/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs b/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
index 14193d7ff..2d7f22164 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
@@ -11,10 +11,11 @@ use radicle_oid::Oid;
use crate::git;
use crate::git::repository;
-use crate::git::repository::types::{Blob, Commit};
+use crate::git::repository::object;
+use crate::git::repository::types::{Blob, Commit, TreeEntry};
use crate::identity::doc;
use crate::storage::HasRepoId;
-use crate::storage::refs::sigrefs::git::{object, reference};
+use crate::storage::refs::sigrefs::git::reference;
use crate::storage::refs::{REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH};
const MOCKED_IDENTITY: u8 = 99u8;
@@ -202,8 +203,8 @@ impl HasRepoId for MockRepository {
}
}
-impl repository::object::Reader for MockRepository {
- fn blob(&self, _oid: Oid) -> Result<Option<Blob>, repository::object::error::read::Blob> {
+impl object::Reader for MockRepository {
+ fn blob(&self, _oid: Oid) -> Result<Option<Blob>, object::error::read::Blob> {
unimplemented!("MockRepository::blob")
}
@@ -211,7 +212,7 @@ impl repository::object::Reader for MockRepository {
&self,
commit: Oid,
path: &P,
- ) -> Result<Option<Blob>, repository::object::error::read::BlobAt> {
+ ) -> Result<Option<Blob>, object::error::read::BlobAt> {
let key = (commit, path.as_ref().to_path_buf());
match self.blobs.get(&key) {
Some(BlobBehavior::Present(bytes)) => Ok(Some(Blob {
@@ -219,26 +220,25 @@ impl repository::object::Reader for MockRepository {
content: bytes.clone(),
})),
Some(BlobBehavior::Missing) | None => Ok(None),
- Some(BlobBehavior::Error) => Err(repository::object::error::read::BlobAt::backend(
+ Some(BlobBehavior::Error) => Err(object::error::read::BlobAt::backend(
std::io::Error::other("mock blob error"),
)),
}
}
- fn commit(&self, oid: Oid) -> Result<Option<Commit>, repository::object::error::read::Commit> {
+ fn commit(&self, oid: Oid) -> Result<Option<Commit>, object::error::read::Commit> {
match self.commits.get(&oid) {
Some(CommitBehavior::Present(data)) => {
let bytes = data.to_string();
- let parsed = Commit::from_bytes(bytes.as_bytes()).map_err(|e| {
- repository::object::error::read::Commit::Parse { oid, source: e }
- })?;
+ let parsed = Commit::from_bytes(bytes.as_bytes())
+ .map_err(|e| object::error::read::Commit::Parse { oid, source: e })?;
Ok(Some(parsed))
}
None => Ok(None),
}
}
- fn exists(&self, _oid: Oid) -> Result<bool, repository::object::error::read::Exists> {
+ fn exists(&self, _oid: Oid) -> Result<bool, object::error::read::Exists> {
unimplemented!("MockRepository::exists")
}
}
@@ -275,25 +275,25 @@ impl repository::reference::Reader for MockRepository {
}
impl object::Writer for MockRepository {
- fn write_tree(
- &self,
- _refs: object::RefsEntry,
- _signature: object::SignatureEntry,
- ) -> Result<Oid, object::error::WriteTree> {
+ fn write_blob(&self, _content: &[u8]) -> Result<Oid, object::error::write::Blob> {
+ unimplemented!("MockRepository::write_blob")
+ }
+
+ fn write_tree(&self, _entries: &[TreeEntry]) -> Result<Oid, object::error::write::Tree> {
match &self.write_tree {
Some(WriteTreeBehavior::Ok(oid)) => Ok(*oid),
- Some(WriteTreeBehavior::Error) | None => Err(object::error::WriteTree::write_error(
+ Some(WriteTreeBehavior::Error) | None => Err(object::error::write::Tree::backend(
std::io::Error::other("mock write_tree error"),
)),
}
}
- fn write_commit(&self, _bytes: &[u8]) -> Result<Oid, object::error::WriteCommit> {
+ fn write_commit(&self, _bytes: &[u8]) -> Result<Oid, object::error::write::Commit> {
match &self.write_commit {
Some(WriteCommitBehavior(oid)) => Ok(*oid),
- None => Err(object::error::WriteCommit::other(std::io::Error::other(
- "mock write_commit error",
- ))),
+ None => Err(object::error::write::Commit::backend(
+ std::io::Error::other("mock write_commit error"),
+ )),
}
}
}
commit 91fabd88e973814a7022d9b520be972fc24270ce
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 14 12:13:06 2026 +0000
storage/refs/sigrefs: Refactor sigrefs::reference::Reader to repository::object::Reader
Replace the sigrefs-specific sigrefs::reference::Reader trait with the shared
git::repository::reference::Reader trait across all sigrefs handlers.
The implementation of the mock `reference::Reader` methods use
unimplemented!() for `list_refs`.
diff --git a/crates/radicle/src/storage.rs b/crates/radicle/src/storage.rs
index 99c99a69c..e36310c39 100644
--- a/crates/radicle/src/storage.rs
+++ b/crates/radicle/src/storage.rs
@@ -11,6 +11,7 @@ use serde::{Deserialize, Serialize};
use thiserror::Error;
pub use crate::git::Oid;
+use crate::git::repository::reference;
use crypto::PublicKey;
pub use git::{Validation, Validations};
@@ -436,7 +437,7 @@ impl Deref for Remote {
/// Read-only operations on a storage instance.
pub trait ReadStorage {
- type Repository: ReadRepository + self::refs::sigrefs::git::reference::Reader;
+ type Repository: ReadRepository + reference::Reader;
/// Get user info for this storage.
fn info(&self) -> &UserInfo;
diff --git a/crates/radicle/src/storage/refs.rs b/crates/radicle/src/storage/refs.rs
index 5d603af63..f189ff467 100644
--- a/crates/radicle/src/storage/refs.rs
+++ b/crates/radicle/src/storage/refs.rs
@@ -80,7 +80,7 @@ impl Refs {
) -> Result<SignedRefs, Error>
where
R: repository::object::Reader + sigrefs::git::object::Writer,
- R: sigrefs::git::reference::Reader + sigrefs::git::reference::Writer,
+ R: repository::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
@@ -98,7 +98,7 @@ impl Refs {
) -> Result<SignedRefs, Error>
where
R: repository::object::Reader + sigrefs::git::object::Writer,
- R: sigrefs::git::reference::Reader + sigrefs::git::reference::Writer,
+ R: repository::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
@@ -116,7 +116,7 @@ impl Refs {
) -> Result<SignedRefs, Error>
where
R: repository::object::Reader + sigrefs::git::object::Writer,
- R: sigrefs::git::reference::Reader + sigrefs::git::reference::Writer,
+ R: repository::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
@@ -349,10 +349,10 @@ pub struct RefsAt {
impl RefsAt {
pub fn new<R>(repo: &R, remote: RemoteId) -> Result<Self, sigrefs::read::error::Read>
where
- R: sigrefs::git::reference::Reader,
+ R: repository::reference::Reader,
{
let at = repo
- .find_reference(
+ .ref_target(
&storage::refs::SIGREFS_BRANCH.with_namespace(git::fmt::Component::from(&remote)),
)
.map_err(sigrefs::read::error::Read::FindReference)?
@@ -426,7 +426,7 @@ impl SignedRefs {
pub fn load<R>(remote: RemoteId, repo: &R) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: repository::object::Reader + sigrefs::git::reference::Reader,
+ R: repository::object::Reader + repository::reference::Reader,
{
Self::load_internal(remote, repo, sigrefs::read::Tip::Reference(remote))
}
@@ -438,7 +438,7 @@ impl SignedRefs {
) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: repository::object::Reader + sigrefs::git::reference::Reader,
+ R: repository::object::Reader + repository::reference::Reader,
{
Self::load_internal(remote, repo, sigrefs::read::Tip::Commit(oid))
}
@@ -450,7 +450,7 @@ impl SignedRefs {
) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: repository::object::Reader + sigrefs::git::reference::Reader,
+ R: repository::object::Reader + repository::reference::Reader,
{
let root = repo.rid();
match sigrefs::SignedRefsReader::new(root, tip, repo, &remote).read() {
diff --git a/crates/radicle/src/storage/refs/sigrefs/read.rs b/crates/radicle/src/storage/refs/sigrefs/read.rs
index ae69a5e70..6fc295552 100644
--- a/crates/radicle/src/storage/refs/sigrefs/read.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/read.rs
@@ -16,9 +16,8 @@ use radicle_git_metadata::commit::CommitData;
use radicle_oid::Oid;
use crate::git;
-use crate::git::repository::object;
+use crate::git::repository::{object, reference};
use crate::identity::doc;
-use crate::storage::refs::sigrefs::git::reference;
use crate::storage::refs::{
FeatureLevel, IDENTITY_ROOT, REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH,
SignedRefs,
@@ -305,7 +304,7 @@ where
SIGREFS_BRANCH.with_namespace(git::fmt::Component::from(&namespace));
let head = self
.repository
- .find_reference(&reference)
+ .ref_target(&reference)
.map_err(error::Read::FindReference)?
.ok_or_else(|| error::Read::MissingSigrefs { namespace })?;
Ok(head)
diff --git a/crates/radicle/src/storage/refs/sigrefs/read/error.rs b/crates/radicle/src/storage/refs/sigrefs/read/error.rs
index e79cb1cbe..6405de833 100644
--- a/crates/radicle/src/storage/refs/sigrefs/read/error.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/read/error.rs
@@ -7,7 +7,7 @@ use radicle_oid::Oid;
use thiserror::Error;
use crate::git::repository::object;
-use crate::storage::refs::sigrefs::git::reference;
+use crate::git::repository::reference;
use crate::storage::refs::sigrefs::read::FeatureLevels;
use crate::storage::refs::{FeatureLevel, canonical};
@@ -17,7 +17,7 @@ pub enum Read {
#[error(transparent)]
Commit(Commit),
#[error(transparent)]
- FindReference(reference::error::FindReference),
+ FindReference(reference::error::read::RefTarget),
#[error("failed to find `refs/namespaces/{namespace}/refs/rad/sigrefs`")]
MissingSigrefs { namespace: NodeId },
#[error(transparent)]
@@ -67,7 +67,7 @@ impl fmt::Display for Parent {
.iter()
.map(|oid| oid.to_string())
.collect::<Vec<_>>()
- .join(", ")
+ .join(", "),
)
}
}
diff --git a/crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs b/crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs
index 4fe02d477..ae1aec026 100644
--- a/crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs
@@ -15,9 +15,9 @@ use radicle_oid::Oid;
use crate::git;
use crate::git::repository::object;
+use crate::git::repository::reference;
use crate::git::repository::types::{Blob, Commit};
use crate::identity::doc;
-use crate::storage::refs::sigrefs::git::reference;
use crate::storage::refs::{REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH};
pub(crate) const MOCKED_IDENTITY: u8 = 99u8;
@@ -216,18 +216,29 @@ impl object::Reader for MockRepository {
}
impl reference::Reader for MockRepository {
- fn find_reference(
+ type References<'a> = std::iter::Empty<
+ Result<(git::fmt::Qualified<'static>, Oid), reference::error::read::ListReference>,
+ >;
+
+ fn ref_target<R: AsRef<git::fmt::RefStr>>(
&self,
- reference: &git::fmt::Namespaced,
- ) -> Result<Option<Oid>, reference::error::FindReference> {
- match self.references.get(reference.as_str()) {
+ name: &R,
+ ) -> Result<Option<Oid>, reference::error::read::RefTarget> {
+ match self.references.get(name.as_ref().as_str()) {
Some(RefBehavior::Present(oid)) => Ok(Some(*oid)),
Some(RefBehavior::Missing) | None => Ok(None),
- Some(RefBehavior::Error) => Err(reference::error::FindReference::other(
+ Some(RefBehavior::Error) => Err(reference::error::read::RefTarget::backend(
std::io::Error::other("mock reference error"),
)),
}
}
+
+ fn list_refs<'a, P: AsRef<git::fmt::refspec::PatternStr>>(
+ &'a self,
+ _pattern: &P,
+ ) -> Result<Self::References<'a>, reference::error::read::ListRefs> {
+ unimplemented!("MockRepository::list_refs")
+ }
}
/// Accepts every (message, signature) pair without inspecting either.
diff --git a/crates/radicle/src/storage/refs/sigrefs/write.rs b/crates/radicle/src/storage/refs/sigrefs/write.rs
index 63464fe3e..6f2da6ac6 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write.rs
@@ -73,7 +73,10 @@ pub struct SignedRefsWriter<'a, R, S> {
impl<'a, R, S> SignedRefsWriter<'a, R, S>
where
- R: object::Writer + repository::object::Reader + reference::Writer + reference::Reader,
+ R: object::Writer
+ + repository::object::Reader
+ + reference::Writer
+ + repository::reference::Reader,
S: Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
{
@@ -378,7 +381,7 @@ struct HeadReader<'a, 'b, 'c, R, V> {
impl<'a, 'b, 'c, R, V> HeadReader<'a, 'b, 'c, R, V>
where
- R: repository::object::Reader + reference::Reader,
+ R: repository::object::Reader + repository::reference::Reader,
V: signature::Verifier<crypto::Signature>,
{
/// Construct a [`HeadReader`] with the `reference` that is being read from
@@ -406,7 +409,7 @@ where
fn read(self) -> Result<Option<Head>, error::Head> {
let Some(oid) = self
.repository
- .find_reference(self.reference)
+ .ref_target(self.reference)
.map_err(error::Head::Reference)?
else {
return Ok(None);
diff --git a/crates/radicle/src/storage/refs/sigrefs/write/error.rs b/crates/radicle/src/storage/refs/sigrefs/write/error.rs
index 12ba0f005..10e4ea9d5 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write/error.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write/error.rs
@@ -1,6 +1,7 @@
use radicle_oid::Oid;
use thiserror::Error;
+use crate::git::repository;
use crate::storage::refs::sigrefs::git::{object, reference};
// TODO: use commit NID (and RID?) for traceability
@@ -41,7 +42,7 @@ pub enum Tree {
#[error(transparent)]
pub enum Head {
#[error(transparent)]
- Reference(reference::error::FindReference),
+ Reference(repository::reference::error::read::RefTarget),
#[error(transparent)]
Commit(super::read::error::Commit),
#[error("failed to verify commit {commit}: {source}")]
diff --git a/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs b/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
index da5485b88..14193d7ff 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
@@ -243,19 +243,35 @@ impl repository::object::Reader for MockRepository {
}
}
-impl reference::Reader for MockRepository {
- fn find_reference(
+impl repository::reference::Reader for MockRepository {
+ type References<'a> = std::iter::Empty<
+ Result<
+ (git::fmt::Qualified<'static>, Oid),
+ repository::reference::error::read::ListReference,
+ >,
+ >;
+
+ fn ref_target<R: AsRef<git::fmt::RefStr>>(
&self,
- reference: &git::fmt::Namespaced,
- ) -> Result<Option<Oid>, reference::error::FindReference> {
- match self.references.get(reference.as_str()) {
+ name: &R,
+ ) -> Result<Option<Oid>, repository::reference::error::read::RefTarget> {
+ match self.references.get(name.as_ref().as_str()) {
Some(RefBehavior::Present(oid)) => Ok(Some(*oid)),
Some(RefBehavior::Missing) | None => Ok(None),
- Some(RefBehavior::Error) => Err(reference::error::FindReference::other(
- std::io::Error::other("mock reference error"),
- )),
+ Some(RefBehavior::Error) => {
+ Err(repository::reference::error::read::RefTarget::backend(
+ std::io::Error::other("mock reference error"),
+ ))
+ }
}
}
+
+ fn list_refs<'a, P: AsRef<git::fmt::refspec::PatternStr>>(
+ &'a self,
+ _pattern: &P,
+ ) -> Result<Self::References<'a>, repository::reference::error::read::ListRefs> {
+ unimplemented!("MockRepository::list_refs")
+ }
}
impl object::Writer for MockRepository {
diff --git a/crates/radicle/src/test/storage.rs b/crates/radicle/src/test/storage.rs
index fb5ee4978..87622d8dc 100644
--- a/crates/radicle/src/test/storage.rs
+++ b/crates/radicle/src/test/storage.rs
@@ -152,16 +152,29 @@ impl MockRepository {
}
}
-impl self::refs::sigrefs::git::reference::Reader for MockRepository {
- fn find_reference(
+impl crate::git::repository::reference::Reader for MockRepository {
+ type References<'a> = std::iter::Empty<
+ Result<
+ (git::fmt::Qualified<'static>, Oid),
+ crate::git::repository::reference::error::read::ListReference,
+ >,
+ >;
+
+ fn ref_target<R: AsRef<git::fmt::RefStr>>(
&self,
- reference: &git::fmt::Namespaced,
- ) -> Result<Option<Oid>, refs::sigrefs::git::reference::error::FindReference> {
- use refs::sigrefs::git::reference::error::FindReference;
- let ns = reference.namespace();
+ name: &R,
+ ) -> Result<Option<Oid>, crate::git::repository::reference::error::read::RefTarget> {
+ use crate::git::repository::reference::error::read::RefTarget;
+
+ let name = name.as_ref();
+ let namespaced = match name.to_namespaced() {
+ Some(ns) => ns,
+ None => return Ok(None),
+ };
- let remote: PublicKey = ns.as_str().parse().map_err(FindReference::other)?;
- let reference = reference.strip_namespace();
+ let ns = namespaced.namespace();
+ let remote: PublicKey = ns.as_str().parse().map_err(RefTarget::backend)?;
+ let reference = namespaced.strip_namespace();
match self.remotes.get(&remote) {
None => Ok(None),
@@ -174,6 +187,14 @@ impl self::refs::sigrefs::git::reference::Reader for MockRepository {
}
}
}
+
+ fn list_refs<'a, P: AsRef<git::fmt::refspec::PatternStr>>(
+ &'a self,
+ _pattern: &P,
+ ) -> Result<Self::References<'a>, crate::git::repository::reference::error::read::ListRefs>
+ {
+ unimplemented!("MockRepository::list_refs")
+ }
}
impl RemoteRepository for MockRepository {
commit ecb262fa634b6a7669d06de3ee5e73e59947019d
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 14 12:01:39 2026 +0100
storage/refs/sigrefs: Refactor sigrefs::object::Reader to repository::object::Reader
Replace the sigrefs-specific sigrefs::object::Reader trait with the shared
git::repository::Reader trait across all sigrefs handlers.
Trait bounds are updated in `storage::refs`, which are satisfied by
`storage::git::Repository`.
The implementation of the mock `object::Reader` methods use
unimplemented!() for unused methods, i.e. `blob`, `exists`.
diff --git a/crates/radicle/src/storage/refs.rs b/crates/radicle/src/storage/refs.rs
index 639dd5f92..5d603af63 100644
--- a/crates/radicle/src/storage/refs.rs
+++ b/crates/radicle/src/storage/refs.rs
@@ -19,6 +19,7 @@ use thiserror::Error;
use crate::git;
use crate::git::Oid;
use crate::git::raw::ErrorExt as _;
+use crate::git::repository;
use crate::storage;
use crate::storage::RemoteId;
use crate::storage::refs::sigrefs::read::Tip;
@@ -78,7 +79,7 @@ impl Refs {
signer: &S,
) -> Result<SignedRefs, Error>
where
- R: sigrefs::git::object::Reader + sigrefs::git::object::Writer,
+ R: repository::object::Reader + sigrefs::git::object::Writer,
R: sigrefs::git::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
@@ -96,7 +97,7 @@ impl Refs {
signer: &S,
) -> Result<SignedRefs, Error>
where
- R: sigrefs::git::object::Reader + sigrefs::git::object::Writer,
+ R: repository::object::Reader + sigrefs::git::object::Writer,
R: sigrefs::git::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
@@ -114,7 +115,7 @@ impl Refs {
force: bool,
) -> Result<SignedRefs, Error>
where
- R: sigrefs::git::object::Reader + sigrefs::git::object::Writer,
+ R: repository::object::Reader + sigrefs::git::object::Writer,
R: sigrefs::git::reference::Reader + sigrefs::git::reference::Writer,
R: HasRepoId,
S: signature::Signer<crypto::Signature>,
@@ -425,7 +426,7 @@ impl SignedRefs {
pub fn load<R>(remote: RemoteId, repo: &R) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: sigrefs::git::object::Reader + sigrefs::git::reference::Reader,
+ R: repository::object::Reader + sigrefs::git::reference::Reader,
{
Self::load_internal(remote, repo, sigrefs::read::Tip::Reference(remote))
}
@@ -437,7 +438,7 @@ impl SignedRefs {
) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: sigrefs::git::object::Reader + sigrefs::git::reference::Reader,
+ R: repository::object::Reader + sigrefs::git::reference::Reader,
{
Self::load_internal(remote, repo, sigrefs::read::Tip::Commit(oid))
}
@@ -449,7 +450,7 @@ impl SignedRefs {
) -> Result<Option<Self>, sigrefs::read::error::Read>
where
R: HasRepoId,
- R: sigrefs::git::object::Reader + sigrefs::git::reference::Reader,
+ R: repository::object::Reader + sigrefs::git::reference::Reader,
{
let root = repo.rid();
match sigrefs::SignedRefsReader::new(root, tip, repo, &remote).read() {
diff --git a/crates/radicle/src/storage/refs/sigrefs/read.rs b/crates/radicle/src/storage/refs/sigrefs/read.rs
index a22bd3703..ae69a5e70 100644
--- a/crates/radicle/src/storage/refs/sigrefs/read.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/read.rs
@@ -16,8 +16,9 @@ use radicle_git_metadata::commit::CommitData;
use radicle_oid::Oid;
use crate::git;
+use crate::git::repository::object;
use crate::identity::doc;
-use crate::storage::refs::sigrefs::git::{object, reference};
+use crate::storage::refs::sigrefs::git::reference;
use crate::storage::refs::{
FeatureLevel, IDENTITY_ROOT, REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH,
SignedRefs,
@@ -466,15 +467,10 @@ where
}
fn read_commit_data(&self) -> Result<CommitData<Oid, Oid>, error::Commit> {
- let bytes = self
- .repository
- .read_commit(&self.commit)
+ self.repository
+ .commit(self.commit)
.map_err(error::Commit::Read)?
- .ok_or(error::Commit::Missing { oid: self.commit })?;
- CommitData::from_bytes(&bytes).map_err(|err| error::Commit::Parse {
- oid: self.commit,
- source: err,
- })
+ .ok_or(error::Commit::Missing { oid: self.commit })
}
/// Extract the single parent [`Oid`] from a [`CommitData`], if any.
@@ -517,40 +513,42 @@ where
fn read(self) -> Result<Tree, error::Tree> {
let (refs, signature) = self.try_handle_blobs()?;
- let refs = Refs::from_canonical(&refs.bytes).map_err(error::Tree::ParseRefs)?;
- let signature = crypto::Signature::try_from(signature.bytes.as_slice())
+ let refs = Refs::from_canonical(&refs.content).map_err(error::Tree::ParseRefs)?;
+ let signature = crypto::Signature::try_from(signature.content.as_slice())
.map_err(error::Tree::ParseSignature)?;
Ok(Tree { refs, signature })
}
/// Fetch the refs blob and signature blob from the repository, returning a
/// descriptive error if either or both are missing.
- fn try_handle_blobs(&self) -> Result<(object::Blob, object::Blob), error::Tree> {
- let commit = &self.commit;
+ fn try_handle_blobs(
+ &self,
+ ) -> Result<(git::repository::Blob, git::repository::Blob), error::Tree> {
+ let commit = self.commit;
let refs_path = Path::new(REFS_BLOB_PATH);
let sig_path = Path::new(SIGNATURE_BLOB_PATH);
- let refs_bytes = self
+ let refs_blob = self
.repository
- .read_blob(commit, refs_path)
+ .blob_at(commit, &refs_path)
.map_err(error::Tree::Refs)?;
- let sig_bytes = self
+ let sig_blob = self
.repository
- .read_blob(commit, sig_path)
+ .blob_at(commit, &sig_path)
.map_err(error::Tree::Signature)?;
- let result = match (refs_bytes, sig_bytes) {
+ let result = match (refs_blob, sig_blob) {
(None, None) => Err(error::MissingBlobs::Both {
- commit: *commit,
+ commit,
refs: refs_path.to_path_buf(),
signature: sig_path.to_path_buf(),
}),
(None, Some(_)) => Err(error::MissingBlobs::Signature {
- commit: *commit,
+ commit,
path: sig_path.to_path_buf(),
}),
(Some(_), None) => Err(error::MissingBlobs::Refs {
- commit: *commit,
+ commit,
path: refs_path.to_path_buf(),
}),
(Some(refs), Some(sig)) => Ok((refs, sig)),
@@ -590,11 +588,11 @@ where
fn read_blob(&self, commit: &Oid) -> Result<RepoId, error::IdentityRoot> {
let path = Path::new("embeds").join(*doc::PATH);
- let object::Blob { oid, .. } = self
+ let blob = self
.repository
- .read_blob(commit, &path)
+ .blob_at(*commit, &path)
.map_err(error::IdentityRoot::Blob)?
.ok_or_else(|| error::IdentityRoot::MissingIdentity { commit: *commit })?;
- Ok(RepoId::from(oid))
+ Ok(RepoId::from(blob.oid))
}
}
diff --git a/crates/radicle/src/storage/refs/sigrefs/read/error.rs b/crates/radicle/src/storage/refs/sigrefs/read/error.rs
index c7a8c0626..e79cb1cbe 100644
--- a/crates/radicle/src/storage/refs/sigrefs/read/error.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/read/error.rs
@@ -6,7 +6,8 @@ use radicle_git_metadata::commit;
use radicle_oid::Oid;
use thiserror::Error;
-use crate::storage::refs::sigrefs::git::{object, reference};
+use crate::git::repository::object;
+use crate::storage::refs::sigrefs::git::reference;
use crate::storage::refs::sigrefs::read::FeatureLevels;
use crate::storage::refs::{FeatureLevel, canonical};
@@ -48,7 +49,7 @@ pub enum Commit {
#[error(transparent)]
TooManyParents(Parent),
#[error(transparent)]
- Read(object::error::ReadCommit),
+ Read(object::error::read::Commit),
}
#[derive(Debug, Error)]
@@ -75,9 +76,9 @@ impl fmt::Display for Parent {
#[non_exhaustive]
pub enum Tree {
#[error(transparent)]
- Refs(object::error::ReadBlob),
+ Refs(object::error::read::BlobAt),
#[error(transparent)]
- Signature(object::error::ReadBlob),
+ Signature(object::error::read::BlobAt),
#[error(transparent)]
ParseRefs(canonical::Error),
#[error(transparent)]
@@ -104,7 +105,7 @@ pub enum MissingBlobs {
#[non_exhaustive]
pub enum IdentityRoot {
#[error(transparent)]
- Blob(object::error::ReadBlob),
+ Blob(object::error::read::BlobAt),
#[error("missing repository identity commit '{commit}'")]
MissingIdentity { commit: Oid },
}
diff --git a/crates/radicle/src/storage/refs/sigrefs/read/iter.rs b/crates/radicle/src/storage/refs/sigrefs/read/iter.rs
index 5807575f1..2f711e750 100644
--- a/crates/radicle/src/storage/refs/sigrefs/read/iter.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/read/iter.rs
@@ -1,6 +1,6 @@
use radicle_oid::Oid;
-use crate::storage::refs::sigrefs::git::object;
+use crate::git::repository::object;
use super::{Commit, CommitReader, error};
diff --git a/crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs b/crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs
index 651c3782a..4fe02d477 100644
--- a/crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/read/test/mock.rs
@@ -1,5 +1,7 @@
-//! Mock implementations of [`object::Reader`] and [`reference::Reader`] for
+//! Mock implementations of [`ObjectReader`] and [`reference::Reader`] for
//! unit-testing.
+//!
+//! [`ObjectReader`]: crate::git::repository::ObjectReader
use std::collections::HashMap;
use std::path::{Path, PathBuf};
@@ -12,13 +14,15 @@ use radicle_git_metadata::commit::trailers::OwnedTrailer;
use radicle_oid::Oid;
use crate::git;
+use crate::git::repository::object;
+use crate::git::repository::types::{Blob, Commit};
use crate::identity::doc;
-use crate::storage::refs::sigrefs::git::{object, reference};
+use crate::storage::refs::sigrefs::git::reference;
use crate::storage::refs::{REFS_BLOB_PATH, Refs, SIGNATURE_BLOB_PATH, SIGREFS_BRANCH};
pub(crate) const MOCKED_IDENTITY: u8 = 99u8;
-/// A configurable in-memory repository implementing [`object::Reader`] and
+/// A configurable in-memory repository implementing [`ObjectReader`] and
/// [`reference::Reader`].
/// All behaviour is set at construction time via the builder methods; the mock
/// is fully deterministic.
@@ -29,20 +33,20 @@ pub struct MockRepository {
}
enum CommitBehavior {
- /// [`object::Reader::read_commit`] returns `Ok(Some(bytes))`.
+ /// [`ObjectReader::commit`] returns `Ok(Some(commit))`.
Present(Box<CommitData<Oid, Oid>>),
- /// [`object::Reader::read_commit`] returns `Ok(None)`.
+ /// [`ObjectReader::commit`] returns `Ok(None)`.
Missing,
- /// [`object::Reader::read_commit`] returns `Err(…)`.
+ /// [`ObjectReader::commit`] returns `Err(…)`.
Error,
}
enum BlobBehavior {
- /// [`object::Reader::read_blob`] returns `Ok(Some(blob))`.
+ /// [`ObjectReader::blob_at`] returns `Ok(Some(blob))`.
Present(Vec<u8>),
- /// [`object::Reader::read_blob`] returns `Ok(None)`.
+ /// [`ObjectReader::blob_at`] returns `Ok(None)`.
Missing,
- /// [`object::Reader::read_blob`] returns `Err(…)`.
+ /// [`ObjectReader::blob_at`] returns `Err(…)`.
Error,
}
@@ -165,37 +169,50 @@ impl MockRepository {
}
impl object::Reader for MockRepository {
- fn read_commit(&self, oid: &Oid) -> Result<Option<Vec<u8>>, object::error::ReadCommit> {
- match self.commits.get(oid) {
- Some(CommitBehavior::Present(data)) => Ok(Some(data.to_string().as_bytes().to_vec())),
- Some(CommitBehavior::Missing) | None => Ok(None),
- Some(CommitBehavior::Error) => Err(object::error::ReadCommit::other(
- std::io::Error::other("mock commit error"),
- )),
- }
+ fn blob(&self, _oid: Oid) -> Result<Option<Blob>, object::error::read::Blob> {
+ unimplemented!("MockRepository::blob")
}
- fn read_blob(
+ fn blob_at<P: AsRef<Path>>(
&self,
- commit: &Oid,
- path: &Path,
- ) -> Result<Option<object::Blob>, object::error::ReadBlob> {
- let key = (*commit, path.to_path_buf());
+ commit: Oid,
+ path: &P,
+ ) -> Result<Option<Blob>, object::error::read::BlobAt> {
+ let key = (commit, path.as_ref().to_path_buf());
match self.blobs.get(&key) {
- Some(BlobBehavior::Present(bytes)) => Ok(Some(object::Blob {
+ Some(BlobBehavior::Present(bytes)) => Ok(Some(Blob {
// The blob OID is returned as the commit OID. This is
// intentional: IdentityRootReader converts blob.oid into a
// RepoId, so callers can predict which RepoId results from a
// given identity-root commit OID.
- oid: *commit,
- bytes: bytes.clone(),
+ oid: commit,
+ content: bytes.clone(),
})),
Some(BlobBehavior::Missing) | None => Ok(None),
- Some(BlobBehavior::Error) => Err(object::error::ReadBlob::other(
+ Some(BlobBehavior::Error) => Err(object::error::read::BlobAt::backend(
std::io::Error::other("mock blob error"),
)),
}
}
+
+ fn commit(&self, oid: Oid) -> Result<Option<Commit>, object::error::read::Commit> {
+ match self.commits.get(&oid) {
+ Some(CommitBehavior::Present(data)) => {
+ let bytes = data.to_string();
+ let parsed = Commit::from_bytes(bytes.as_bytes())
+ .map_err(|e| object::error::read::Commit::Parse { oid, source: e })?;
+ Ok(Some(parsed))
+ }
+ Some(CommitBehavior::Missing) | None => Ok(None),
+ Some(CommitBehavior::Error) => Err(object::error::read::Commit::backend(
+ std::io::Error::other("mock commit error"),
+ )),
+ }
+ }
+
+ fn exists(&self, _oid: Oid) -> Result<bool, object::error::read::Exists> {
+ unimplemented!("MockRepository::exists")
+ }
}
impl reference::Reader for MockRepository {
diff --git a/crates/radicle/src/storage/refs/sigrefs/write.rs b/crates/radicle/src/storage/refs/sigrefs/write.rs
index a427fb7fb..63464fe3e 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write.rs
@@ -13,6 +13,7 @@ use radicle_git_metadata::commit::{CommitData, headers::Headers, trailers::Owned
use radicle_oid::Oid;
use crate::git;
+use crate::git::repository;
use crate::storage::refs::SignedRefs;
use crate::storage::refs::sigrefs::git::{Committer, object, reference};
use crate::storage::refs::sigrefs::read::CommitReader;
@@ -72,7 +73,7 @@ pub struct SignedRefsWriter<'a, R, S> {
impl<'a, R, S> SignedRefsWriter<'a, R, S>
where
- R: object::Writer + object::Reader + reference::Writer + reference::Reader,
+ R: object::Writer + repository::object::Reader + reference::Writer + reference::Reader,
S: Signer<crypto::Signature>,
S: signature::Verifier<crypto::Signature>,
{
@@ -377,7 +378,7 @@ struct HeadReader<'a, 'b, 'c, R, V> {
impl<'a, 'b, 'c, R, V> HeadReader<'a, 'b, 'c, R, V>
where
- R: object::Reader + reference::Reader,
+ R: repository::object::Reader + reference::Reader,
V: signature::Verifier<crypto::Signature>,
{
/// Construct a [`HeadReader`] with the `reference` that is being read from
diff --git a/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs b/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
index 23ff266a4..da5485b88 100644
--- a/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/write/test/mock.rs
@@ -10,6 +10,8 @@ use radicle_git_metadata::commit::trailers::OwnedTrailer;
use radicle_oid::Oid;
use crate::git;
+use crate::git::repository;
+use crate::git::repository::types::{Blob, Commit};
use crate::identity::doc;
use crate::storage::HasRepoId;
use crate::storage::refs::sigrefs::git::{object, reference};
@@ -200,31 +202,45 @@ impl HasRepoId for MockRepository {
}
}
-impl object::Reader for MockRepository {
- fn read_commit(&self, oid: &Oid) -> Result<Option<Vec<u8>>, object::error::ReadCommit> {
- match self.commits.get(oid) {
- Some(CommitBehavior::Present(data)) => Ok(Some(data.to_string().as_bytes().to_vec())),
- None => Ok(None),
- }
+impl repository::object::Reader for MockRepository {
+ fn blob(&self, _oid: Oid) -> Result<Option<Blob>, repository::object::error::read::Blob> {
+ unimplemented!("MockRepository::blob")
}
- fn read_blob(
+ fn blob_at<P: AsRef<Path>>(
&self,
- commit: &Oid,
- path: &Path,
- ) -> Result<Option<object::Blob>, object::error::ReadBlob> {
- let key = (*commit, path.to_path_buf());
+ commit: Oid,
+ path: &P,
+ ) -> Result<Option<Blob>, repository::object::error::read::BlobAt> {
+ let key = (commit, path.as_ref().to_path_buf());
match self.blobs.get(&key) {
- Some(BlobBehavior::Present(bytes)) => Ok(Some(object::Blob {
- oid: *commit,
- bytes: bytes.clone(),
+ Some(BlobBehavior::Present(bytes)) => Ok(Some(Blob {
+ oid: commit,
+ content: bytes.clone(),
})),
Some(BlobBehavior::Missing) | None => Ok(None),
- Some(BlobBehavior::Error) => Err(object::error::ReadBlob::other(
+ Some(BlobBehavior::Error) => Err(repository::object::error::read::BlobAt::backend(
std::io::Error::other("mock blob error"),
)),
}
}
+
+ fn commit(&self, oid: Oid) -> Result<Option<Commit>, repository::object::error::read::Commit> {
+ match self.commits.get(&oid) {
+ Some(CommitBehavior::Present(data)) => {
+ let bytes = data.to_string();
+ let parsed = Commit::from_bytes(bytes.as_bytes()).map_err(|e| {
+ repository::object::error::read::Commit::Parse { oid, source: e }
+ })?;
+ Ok(Some(parsed))
+ }
+ None => Ok(None),
+ }
+ }
+
+ fn exists(&self, _oid: Oid) -> Result<bool, repository::object::error::read::Exists> {
+ unimplemented!("MockRepository::exists")
+ }
}
impl reference::Reader for MockRepository {
commit 97f12120f397243a8bdcf9ab947c5b80f3303a59
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 14 12:43:49 2026 +0000
storage/git: Implement git::repository traits for Repository
diff --git a/crates/radicle/src/storage/git.rs b/crates/radicle/src/storage/git.rs
index 56b185435..23495324a 100644
--- a/crates/radicle/src/storage/git.rs
+++ b/crates/radicle/src/storage/git.rs
@@ -13,6 +13,8 @@ use std::{fs, io};
use crate::git::canonical::Quorum;
use crate::git::raw::ErrorExt as _;
+use crate::git::repository;
+use crate::git::repository::{ancestry, object, reference, revwalk};
use crate::identity::doc::DocError;
use crate::identity::{Doc, DocAt, RepoId};
use crate::identity::{Identity, Project};
@@ -1134,6 +1136,151 @@ impl sigrefs::git::reference::Writer for Repository {
}
}
+impl object::Reader for Repository {
+ fn blob(&self, oid: Oid) -> Result<Option<git::repository::Blob>, object::error::read::Blob> {
+ object::Reader::blob(&self.backend, oid)
+ }
+
+ fn blob_at<P>(
+ &self,
+ commit: Oid,
+ path: &P,
+ ) -> Result<Option<git::repository::Blob>, object::error::read::BlobAt>
+ where
+ P: AsRef<Path>,
+ {
+ object::Reader::blob_at(&self.backend, commit, path)
+ }
+
+ fn commit(
+ &self,
+ oid: Oid,
+ ) -> Result<Option<git::repository::Commit>, object::error::read::Commit> {
+ object::Reader::commit(&self.backend, oid)
+ }
+
+ fn exists(&self, oid: Oid) -> Result<bool, object::error::read::Exists> {
+ object::Reader::exists(&self.backend, oid)
+ }
+}
+
+impl object::Writer for Repository {
+ fn write_blob(&self, content: &[u8]) -> Result<Oid, object::error::write::Blob> {
+ object::Writer::write_blob(&self.backend, content)
+ }
+
+ fn write_tree(
+ &self,
+ entries: &[repository::types::TreeEntry],
+ ) -> Result<Oid, object::error::write::Tree> {
+ object::Writer::write_tree(&self.backend, entries)
+ }
+
+ fn write_commit(&self, bytes: &[u8]) -> Result<Oid, object::error::write::Commit> {
+ object::Writer::write_commit(&self.backend, bytes)
+ }
+}
+
+impl reference::Reader for Repository {
+ type References<'a> = <git::raw::Repository as reference::Reader>::References<'a>;
+
+ fn ref_target<R>(&self, name: &R) -> Result<Option<Oid>, reference::error::read::RefTarget>
+ where
+ R: AsRef<git::fmt::RefStr>,
+ {
+ reference::Reader::ref_target(&self.backend, name)
+ }
+
+ fn list_refs<'a, P>(
+ &'a self,
+ pattern: &P,
+ ) -> Result<Self::References<'a>, reference::error::read::ListRefs>
+ where
+ P: AsRef<git::fmt::refspec::PatternStr>,
+ {
+ reference::Reader::list_refs(&self.backend, pattern)
+ }
+}
+
+impl reference::Writer for Repository {
+ fn write_ref<R>(
+ &self,
+ name: &R,
+ target: reference::Target,
+ reflog: &str,
+ ) -> Result<(), reference::error::write::WriteRef>
+ where
+ R: AsRef<git::fmt::RefStr>,
+ {
+ reference::Writer::write_ref(&self.backend, name, target, reflog)
+ }
+
+ fn delete_ref<R>(&self, name: &R) -> Result<(), reference::error::write::DeleteRef>
+ where
+ R: AsRef<git::fmt::RefStr>,
+ {
+ reference::Writer::delete_ref(&self.backend, name)
+ }
+}
+
+impl reference::symbolic::Writer for Repository {
+ fn write_symbolic_ref<R>(
+ &self,
+ name: &R,
+ target: reference::symbolic::Target,
+ reflog: &str,
+ ) -> Result<(), reference::error::write::WriteSymbolicRef>
+ where
+ R: AsRef<radicle_git_ref_format::RefStr>,
+ {
+ reference::symbolic::Writer::write_symbolic_ref(&self.backend, name, target, reflog)
+ }
+}
+
+impl repository::Ancestry for Repository {
+ fn merge_base(&self, a: Oid, b: Oid) -> Result<Option<Oid>, ancestry::error::MergeBase> {
+ repository::Ancestry::merge_base(&self.backend, a, b)
+ }
+
+ fn is_ancestor(&self, ancestor: Oid, head: Oid) -> Result<bool, ancestry::error::IsAncestor> {
+ repository::Ancestry::is_ancestor(&self.backend, ancestor, head)
+ }
+
+ fn ahead_behind(
+ &self,
+ commit: Oid,
+ upstream: Oid,
+ ) -> Result<repository::AheadBehind, ancestry::error::AheadBehind> {
+ repository::Ancestry::ahead_behind(&self.backend, commit, upstream)
+ }
+}
+
+impl repository::Revwalk for Repository {
+ type RevwalkOids<'a>
+ = <git::raw::Repository as repository::Revwalk>::RevwalkOids<'a>
+ where
+ Self: 'a;
+
+ type RevwalkCommits<'a>
+ = <git::raw::Repository as repository::Revwalk>::RevwalkCommits<'a>
+ where
+ Self: 'a;
+
+ fn revwalk_oids<'a>(
+ &'a self,
+ plan: &repository::RevwalkPlan,
+ ) -> Result<Self::RevwalkOids<'a>, revwalk::error::Init> {
+ repository::Revwalk::revwalk_oids(&self.backend, plan)
+ }
+
+ fn revwalk_commits<'a>(
+ &'a self,
+ plan: &repository::RevwalkPlan,
+ ) -> Result<Self::RevwalkCommits<'a>, revwalk::error::Init> {
+ repository::Revwalk::revwalk_commits(&self.backend, plan)
+ }
+}
+
pub mod trailers {
use std::str::FromStr;
commit 8c0be1e77e38bbb762799a1c38a71394a19454d6
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Sun Apr 12 07:22:56 2026 +0000
radicle/git/repository: Implement git2 adapter for all traits
Implement the git repository abstraction traits for
`git::raw::Repository`, adapting git2 to the domain types.
diff --git a/crates/radicle/src/git/raw.rs b/crates/radicle/src/git/raw.rs
index 68f589ed0..8508b5487 100644
--- a/crates/radicle/src/git/raw.rs
+++ b/crates/radicle/src/git/raw.rs
@@ -6,7 +6,8 @@
// Re-exports that are only used within this crate.
pub(crate) use git2::{
- AutotagOption, Blob, FetchOptions, FetchPrune, Object, Revwalk, Sort, message_trailers_strs,
+ AutotagOption, Blob, FetchOptions, FetchPrune, Object, Revwalk, Sort, TreeEntry,
+ message_trailers_strs,
};
#[cfg(unix)]
@@ -19,8 +20,8 @@ pub(crate) use git2::RemoteCallbacks;
// Re-exports that are used by other crates in the workspace, including this crate.
pub use git2::{
Branch, BranchType, Commit, Direction, Error, ErrorClass, ErrorCode, FileMode, ObjectType, Oid,
- Reference, Remote, Repository, RepositoryInitOptions, RepositoryOpenFlags, Signature, Time,
- Tree,
+ Reference, References, Remote, Repository, RepositoryInitOptions, RepositoryOpenFlags,
+ Signature, Time, Tree,
};
// Re-exports that are used by other crates in the workspace, but *not* this crate.
@@ -32,7 +33,6 @@ pub mod build {
// Re-exports for `radicle-cli`.
pub use git2::build::CheckoutBuilder;
- #[cfg(test)]
pub(crate) use git2::build::TreeUpdateBuilder;
}
diff --git a/crates/radicle/src/git/repository.rs b/crates/radicle/src/git/repository.rs
index aa7f2d7ce..73423a00f 100644
--- a/crates/radicle/src/git/repository.rs
+++ b/crates/radicle/src/git/repository.rs
@@ -17,6 +17,8 @@ pub mod reference;
pub mod revwalk;
pub mod types;
+mod adapter;
+
pub use ancestry::{AheadBehind, Ancestry};
pub use revwalk::{Revwalk, RevwalkPlan, SortOrder};
pub use types::{Blob, Commit, ObjectKind, TreeEntry};
diff --git a/crates/radicle/src/git/repository/adapter.rs b/crates/radicle/src/git/repository/adapter.rs
new file mode 100644
index 000000000..523ee2d4b
--- /dev/null
+++ b/crates/radicle/src/git/repository/adapter.rs
@@ -0,0 +1,5 @@
+//! Adapters for the traits defined in [`git::repository`].
+//!
+//! [`git::repository`]: crate::git::repository
+
+mod git2;
diff --git a/crates/radicle/src/git/repository/adapter/git2.rs b/crates/radicle/src/git/repository/adapter/git2.rs
new file mode 100644
index 000000000..56c8a078b
--- /dev/null
+++ b/crates/radicle/src/git/repository/adapter/git2.rs
@@ -0,0 +1,44 @@
+//! The [`Repository`] adapters for the various repository traits.
+//!
+//! [`Repository`]: crate::git::raw::Repository
+
+use crate::git;
+use crate::git::raw;
+
+use crate::git::repository::ObjectKind;
+
+mod ancestry;
+mod object;
+mod reference;
+mod revwalk;
+
+/// Helper trait to enable method chaining to return `None` when the error
+/// matches [`ErrorCode::NotFound`].
+///
+/// [`ErrorCode::NotFound`]: crate::git::raw::ErrorCode::NotFound
+trait NotFound<T> {
+ fn or_is_not_found(self) -> Result<Option<T>, raw::Error>;
+}
+
+impl<T> NotFound<T> for Result<T, raw::Error> {
+ fn or_is_not_found(self) -> Result<Option<T>, git::raw::Error> {
+ self.map(|t| Ok(Some(t))).unwrap_or_else(|e| {
+ if matches!(e.code(), raw::ErrorCode::NotFound) {
+ Ok(None)
+ } else {
+ Err(e)
+ }
+ })
+ }
+}
+
+/// Map a [`raw::ObjectType`] to an [`ObjectKind`].
+fn object_kind(kind: raw::ObjectType) -> ObjectKind {
+ match kind {
+ raw::ObjectType::Blob => ObjectKind::Blob,
+ raw::ObjectType::Tree => ObjectKind::Tree,
+ raw::ObjectType::Commit => ObjectKind::Commit,
+ raw::ObjectType::Tag => ObjectKind::Tag,
+ raw::ObjectType::Any => unreachable!("git2 does not expose other object types"),
+ }
+}
diff --git a/crates/radicle/src/git/repository/adapter/git2/ancestry.rs b/crates/radicle/src/git/repository/adapter/git2/ancestry.rs
new file mode 100644
index 000000000..87b3af00d
--- /dev/null
+++ b/crates/radicle/src/git/repository/adapter/git2/ancestry.rs
@@ -0,0 +1,62 @@
+use radicle_oid::Oid;
+
+use crate::git::raw;
+use crate::git::repository::ancestry;
+use crate::git::repository::ancestry::{AheadBehind, Ancestry};
+
+use super::NotFound as _;
+
+impl Ancestry for raw::Repository {
+ fn merge_base(&self, a: Oid, b: Oid) -> Result<Option<Oid>, ancestry::error::MergeBase> {
+ let odb = self.odb().map_err(ancestry::error::MergeBase::backend)?;
+
+ if !odb.exists(a.into()) {
+ return Err(ancestry::error::MergeBase::CommitNotFound { oid: a });
+ }
+
+ if !odb.exists(b.into()) {
+ return Err(ancestry::error::MergeBase::CommitNotFound { oid: b });
+ }
+
+ self.merge_base(a.into(), b.into())
+ .map(Oid::from)
+ .or_is_not_found()
+ .map_err(ancestry::error::MergeBase::backend)
+ }
+
+ fn is_ancestor(&self, ancestor: Oid, head: Oid) -> Result<bool, ancestry::error::IsAncestor> {
+ let odb = self.odb().map_err(ancestry::error::IsAncestor::backend)?;
+
+ if !odb.exists(ancestor.into()) {
+ return Err(ancestry::error::IsAncestor::CommitNotFound { oid: ancestor });
+ }
+
+ if !odb.exists(head.into()) {
+ return Err(ancestry::error::IsAncestor::CommitNotFound { oid: head });
+ }
+
+ self.graph_descendant_of(head.into(), ancestor.into())
+ .map_err(ancestry::error::IsAncestor::backend)
+ }
+
+ fn ahead_behind(
+ &self,
+ commit: Oid,
+ upstream: Oid,
+ ) -> Result<AheadBehind, ancestry::error::AheadBehind> {
+ let odb = self.odb().map_err(ancestry::error::AheadBehind::backend)?;
+
+ if !odb.exists(commit.into()) {
+ return Err(ancestry::error::AheadBehind::CommitNotFound { oid: commit });
+ }
+
+ if !odb.exists(upstream.into()) {
+ return Err(ancestry::error::AheadBehind::CommitNotFound { oid: upstream });
+ }
+
+ let (ahead, behind) = self
+ .graph_ahead_behind(commit.into(), upstream.into())
+ .map_err(ancestry::error::AheadBehind::backend)?;
+ Ok(AheadBehind { ahead, behind })
+ }
+}
diff --git a/crates/radicle/src/git/repository/adapter/git2/object.rs b/crates/radicle/src/git/repository/adapter/git2/object.rs
new file mode 100644
index 000000000..30b90b353
--- /dev/null
+++ b/crates/radicle/src/git/repository/adapter/git2/object.rs
@@ -0,0 +1,167 @@
+use std::path::Path;
+
+use radicle_oid::Oid;
+
+use crate::git;
+use crate::git::raw;
+use crate::git::repository::object;
+use crate::git::repository::object::error::{read, write};
+use crate::git::repository::types::{Blob, Commit, ObjectKind, TreeEntry};
+
+use super::NotFound as _;
+use super::object_kind;
+
+impl object::Reader for raw::Repository {
+ fn blob(&self, oid: Oid) -> Result<Option<Blob>, read::Blob> {
+ self.find_blob(oid.into())
+ .map(|blob| Blob {
+ oid,
+ content: blob.content().to_vec(),
+ })
+ .or_is_not_found()
+ .map_err(read::Blob::backend)
+ }
+
+ fn blob_at<P: AsRef<Path>>(&self, oid: Oid, path: &P) -> Result<Option<Blob>, read::BlobAt> {
+ let path = path.as_ref();
+ let commit = find_commit(self, oid, &path)?;
+ let tree = commit.tree().map_err(|e| read::BlobAt::Tree {
+ commit: oid,
+ source: Box::new(e),
+ })?;
+ let entry = tree
+ .get_path(path)
+ .or_is_not_found()
+ .map_err(|e| read::BlobAt::TreeEntry {
+ commit: oid,
+ path: path.to_path_buf(),
+ source: Box::new(e),
+ })?;
+ entry
+ .map(|entry| try_entry_to_blob(self, oid, path, entry))
+ .transpose()
+ }
+
+ fn commit(&self, oid: Oid) -> Result<Option<Commit>, read::Commit> {
+ let odb = self.odb().map_err(read::Commit::backend)?;
+ let commit = odb
+ .read(oid.into())
+ .or_is_not_found()
+ .map_err(read::Commit::backend)?;
+ commit
+ .map(|obj| {
+ Commit::from_bytes(obj.data()).map_err(|e| read::Commit::Parse { oid, source: e })
+ })
+ .transpose()
+ }
+
+ fn exists(&self, oid: Oid) -> Result<bool, read::Exists> {
+ self.odb()
+ .map(|odb| odb.exists(oid.into()))
+ .map_err(read::Exists::backend)
+ }
+}
+
+impl object::Writer for raw::Repository {
+ fn write_blob(&self, content: &[u8]) -> Result<Oid, write::Blob> {
+ self.blob(content)
+ .map(Oid::from)
+ .map_err(write::Blob::backend)
+ }
+
+ fn write_tree(&self, entries: &[TreeEntry]) -> Result<Oid, write::Tree> {
+ let empty_tree = empty_tree(self)?;
+ let mut builder = raw::build::TreeUpdateBuilder::new();
+ let odb = self.odb().map_err(write::Tree::backend)?;
+ for entry in entries {
+ match entry {
+ TreeEntry::Blob { path, content } => {
+ let oid = self.blob(content).map_err(|e| write::Tree::WriteBlob {
+ path: path.to_path_buf(),
+ source: Box::new(e),
+ })?;
+ builder.upsert(path, oid, raw::FileMode::Blob);
+ }
+ TreeEntry::BlobRef { path, oid } => {
+ if !odb.exists(oid.into()) {
+ return Err(write::Tree::MissingBlob { oid: *oid });
+ }
+ builder.upsert(path, (*oid).into(), raw::FileMode::Blob);
+ }
+ }
+ }
+
+ builder
+ .create_updated(self, &empty_tree)
+ .map(Oid::from)
+ .map_err(write::Tree::backend)
+ }
+
+ fn write_commit(&self, bytes: &[u8]) -> Result<Oid, write::Commit> {
+ let odb = self.odb().map_err(write::Commit::backend)?;
+ odb.write(raw::ObjectType::Commit, bytes)
+ .map(Oid::from)
+ .map_err(write::Commit::backend)
+ }
+}
+
+/// Get or create the empty tree for use as a baseline.
+fn empty_tree(repo: &raw::Repository) -> Result<git::raw::Tree<'_>, write::Tree> {
+ let empty_oid = repo
+ .treebuilder(None)
+ .map_err(write::Tree::backend)?
+ .write()
+ .map_err(write::Tree::backend)?;
+ repo.find_tree(empty_oid).map_err(write::Tree::backend)
+}
+
+fn find_commit<'a, P: AsRef<Path>>(
+ repository: &'a git::raw::Repository,
+ commit: Oid,
+ path: &P,
+) -> Result<git::raw::Commit<'a>, read::BlobAt> {
+ match repository.find_commit(commit.into()) {
+ Ok(c) => Ok(c),
+ Err(e) if matches!(e.code(), git::raw::ErrorCode::NotFound) => {
+ Err(read::BlobAt::CommitNotFound {
+ commit,
+ path: path.as_ref().to_path_buf(),
+ })
+ }
+ Err(e) => Err(read::BlobAt::backend(e)),
+ }
+}
+
+fn try_object_to_blob(obj: git::raw::Object) -> Result<Blob, read::BlobAt> {
+ let blob = obj.into_blob().map_err(|obj| {
+ let actual = obj
+ .kind()
+ .map(|k| object_kind(k).to_string())
+ .unwrap_or_else(|| "unknown".to_string());
+ read::BlobAt::TypeMismatch {
+ oid: Oid::from(obj.id()),
+ expected: ObjectKind::Blob,
+ actual,
+ }
+ })?;
+ Ok(Blob {
+ oid: Oid::from(blob.id()),
+ content: blob.content().to_vec(),
+ })
+}
+
+fn try_entry_to_blob(
+ repository: &git::raw::Repository,
+ oid: Oid,
+ path: &Path,
+ entry: raw::TreeEntry<'_>,
+) -> Result<Blob, read::BlobAt> {
+ let obj = entry
+ .to_object(repository)
+ .map_err(|e| read::BlobAt::Object {
+ commit: oid,
+ path: path.to_path_buf(),
+ source: Box::new(e),
+ })?;
+ try_object_to_blob(obj)
+}
diff --git a/crates/radicle/src/git/repository/adapter/git2/reference.rs b/crates/radicle/src/git/repository/adapter/git2/reference.rs
new file mode 100644
index 000000000..fb89e29c9
--- /dev/null
+++ b/crates/radicle/src/git/repository/adapter/git2/reference.rs
@@ -0,0 +1,294 @@
+use radicle_git_ref_format::{Qualified, RefStr, refspec};
+use radicle_oid::Oid;
+
+use crate::git;
+use crate::git::raw;
+use crate::git::repository::reference::error::{read, write};
+use crate::git::repository::reference::{self, symbolic};
+
+use super::NotFound as _;
+
+/// Iterator adapter for [`reference::Reader::list_refs`].
+pub struct References<'a> {
+ inner: git::raw::References<'a>,
+}
+
+impl Iterator for References<'_> {
+ type Item = Result<(Qualified<'static>, Oid), read::ListReference>;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ loop {
+ let r = match self.inner.next()? {
+ Ok(r) => r,
+ Err(e) => {
+ return Some(Err(read::ListReference::backend(e)));
+ }
+ };
+
+ let name = match r.name() {
+ Some(n) => n,
+ None => continue,
+ };
+
+ let refstr = match RefStr::try_from_str(name) {
+ Ok(r) => r,
+ Err(e) => {
+ return Some(Err(read::ListReference::Parse {
+ name: name.to_string(),
+ source: e,
+ }));
+ }
+ };
+
+ let qualified = match Qualified::from_refstr(refstr) {
+ Some(q) => q.to_owned(),
+ None => continue,
+ };
+
+ let oid = match r.resolve().map(|r| r.target()) {
+ Ok(Some(oid)) => Oid::from(oid),
+ Ok(None) => continue,
+ Err(e) => {
+ return Some(Err(read::ListReference::Peel {
+ name: qualified,
+ source: Box::new(e),
+ }));
+ }
+ };
+
+ return Some(Ok((qualified, oid)));
+ }
+ }
+}
+
+impl reference::Reader for raw::Repository {
+ type References<'a> = References<'a>;
+
+ fn ref_target<R: AsRef<RefStr>>(&self, name: &R) -> Result<Option<Oid>, read::RefTarget> {
+ self.refname_to_id(name.as_ref().as_str())
+ .map(Oid::from)
+ .or_is_not_found()
+ .map_err(read::RefTarget::backend)
+ }
+
+ fn list_refs<'a, P>(&'a self, pattern: &P) -> Result<Self::References<'a>, read::ListRefs>
+ where
+ P: AsRef<refspec::PatternStr>,
+ {
+ let inner = self
+ .references_glob(pattern.as_ref().as_str())
+ .map_err(read::ListRefs::backend)?;
+ Ok(References { inner })
+ }
+}
+
+impl reference::Writer for raw::Repository {
+ fn write_ref<R>(
+ &self,
+ name: &R,
+ target: reference::Target,
+ reflog: &str,
+ ) -> Result<(), write::WriteRef>
+ where
+ R: AsRef<RefStr>,
+ {
+ let name = name.as_ref();
+
+ // Verify the target object exists.
+ {
+ let odb = self.odb().map_err(write::WriteRef::backend)?;
+ let target_oid = target.target();
+ if !odb.exists(target_oid.into()) {
+ return Err(write::WriteRef::MissingTarget {
+ name: name.to_string(),
+ target: target_oid,
+ });
+ }
+ }
+
+ match target {
+ reference::Target::Create { target } => {
+ create_reference(self, reflog, name, target)?;
+ }
+ reference::Target::Upsert { target } => {
+ upsert_reference(self, reflog, name, target)?;
+ }
+ reference::Target::Cas { target, expected } => {
+ cas_reference(self, reflog, name, target, expected)?;
+ }
+ }
+
+ Ok(())
+ }
+
+ fn delete_ref<R>(&self, name: &R) -> Result<(), write::DeleteRef>
+ where
+ R: AsRef<RefStr>,
+ {
+ match self.find_reference(name.as_ref().as_str()) {
+ Ok(mut r) => r.delete().map_err(write::DeleteRef::backend),
+ Err(e) if matches!(e.code(), git::raw::ErrorCode::NotFound) => Ok(()),
+ Err(e) => Err(write::DeleteRef::backend(e)),
+ }
+ }
+}
+
+fn create_reference(
+ repository: &git::raw::Repository,
+ reflog: &str,
+ name: &RefStr,
+ target: Oid,
+) -> Result<(), write::WriteRef> {
+ repository
+ .reference(name, target.into(), false, reflog)
+ .map_err(|e| {
+ if matches!(e.code(), raw::ErrorCode::Exists) {
+ write::WriteRef::ReferenceExists {
+ name: name.to_string(),
+ }
+ } else {
+ write::WriteRef::backend(e)
+ }
+ })?;
+ Ok(())
+}
+
+fn upsert_reference(
+ repository: &git::raw::Repository,
+ reflog: &str,
+ name: &RefStr,
+ target: Oid,
+) -> Result<(), write::WriteRef> {
+ repository
+ .reference(name, target.into(), true, reflog)
+ .map_err(write::WriteRef::backend)?;
+ Ok(())
+}
+
+fn cas_reference(
+ repository: &git::raw::Repository,
+ reflog: &str,
+ name: &RefStr,
+ target: Oid,
+ expected: Oid,
+) -> Result<(), write::WriteRef> {
+ // CAS requires `force=true` so that libgit2 skips the existence
+ // check in `reference_path_available` and instead compares the
+ // current value via `cmp_old_ref`. With `force=false`, an existing
+ // reference would always fail with `GIT_EEXISTS` before the old
+ // value is ever compared.
+ repository
+ .reference_matching(name, target.into(), true, expected.into(), reflog)
+ .map_err(|e| {
+ if matches!(e.code(), raw::ErrorCode::Modified) {
+ write::WriteRef::CasFailed {
+ name: name.to_string(),
+ expected,
+ }
+ } else {
+ write::WriteRef::backend(e)
+ }
+ })?;
+ Ok(())
+}
+
+impl symbolic::Writer for raw::Repository {
+ fn write_symbolic_ref<R>(
+ &self,
+ name: &R,
+ target: symbolic::Target,
+ reflog: &str,
+ ) -> Result<(), write::WriteSymbolicRef>
+ where
+ R: AsRef<RefStr>,
+ {
+ let name = name.as_ref();
+
+ // Ensure the target reference exists.
+ {
+ let target = target.target();
+ match self.find_reference(target) {
+ Ok(_) => {}
+ Err(e) if matches!(e.code(), git::raw::ErrorCode::NotFound) => {
+ return Err(write::WriteSymbolicRef::MissingTarget {
+ name: name.to_ref_string(),
+ target: target.to_owned(),
+ });
+ }
+ Err(e) => {
+ return Err(write::WriteSymbolicRef::backend(e));
+ }
+ }
+ }
+
+ match target {
+ symbolic::Target::Create { target } => {
+ create_symbolic_reference(self, reflog, name, &target)?;
+ }
+ symbolic::Target::Upsert { target } => {
+ upsert_symbolic_reference(self, reflog, name, &target)?;
+ }
+ symbolic::Target::Cas { target, expected } => {
+ cas_symbolic_reference(self, reflog, name, &target, &expected)?;
+ }
+ }
+
+ Ok(())
+ }
+}
+
+fn create_symbolic_reference(
+ repository: &git::raw::Repository,
+ reflog: &str,
+ name: &RefStr,
+ target: &RefStr,
+) -> Result<(), write::WriteSymbolicRef> {
+ repository
+ .reference_symbolic(name, target, false, reflog)
+ .map_err(|e| {
+ if matches!(e.code(), raw::ErrorCode::Exists) {
+ write::WriteSymbolicRef::ReferenceExists {
+ name: name.to_ref_string(),
+ target: target.to_ref_string(),
+ }
+ } else {
+ write::WriteSymbolicRef::backend(e)
+ }
+ })?;
+ Ok(())
+}
+
+fn upsert_symbolic_reference(
+ repository: &git::raw::Repository,
+ reflog: &str,
+ name: &RefStr,
+ target: &RefStr,
+) -> Result<(), write::WriteSymbolicRef> {
+ repository
+ .reference_symbolic(name, target, true, reflog)
+ .map_err(write::WriteSymbolicRef::backend)?;
+ Ok(())
+}
+
+fn cas_symbolic_reference(
+ repository: &git::raw::Repository,
+ reflog: &str,
+ name: &RefStr,
+ target: &RefStr,
+ expected: &RefStr,
+) -> Result<(), write::WriteSymbolicRef> {
+ // See `cas_reference` for why `force=true` is required for CAS.
+ repository
+ .reference_symbolic_matching(name, target, true, expected, reflog)
+ .map_err(|e| {
+ if matches!(e.code(), raw::ErrorCode::Modified) {
+ write::WriteSymbolicRef::CasFailed {
+ name: name.to_ref_string(),
+ expected: expected.to_ref_string(),
+ }
+ } else {
+ write::WriteSymbolicRef::backend(e)
+ }
+ })?;
+ Ok(())
+}
diff --git a/crates/radicle/src/git/repository/adapter/git2/revwalk.rs b/crates/radicle/src/git/repository/adapter/git2/revwalk.rs
new file mode 100644
index 000000000..1b8500a03
--- /dev/null
+++ b/crates/radicle/src/git/repository/adapter/git2/revwalk.rs
@@ -0,0 +1,113 @@
+use radicle_oid::Oid;
+
+use crate::git;
+use crate::git::raw;
+
+use crate::git::repository::revwalk::error;
+use crate::git::repository::revwalk::{Revwalk, RevwalkPlan, SortOrder};
+use crate::git::repository::types::Commit;
+
+/// [`Revwalk::RevwalkOids`] iterator using [`raw::Revwalk`].
+pub struct RevwalkOids<'a> {
+ inner: raw::Revwalk<'a>,
+}
+
+impl<'a> RevwalkOids<'a> {
+ pub fn hide(&mut self, oid: Oid) -> Result<(), error::Oids> {
+ self.inner.hide(oid.into()).map_err(error::Oids::backend)
+ }
+}
+
+impl Iterator for RevwalkOids<'_> {
+ type Item = Result<Oid, error::Oids>;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ self.inner
+ .next()
+ .map(|r| r.map(Oid::from).map_err(error::Oids::backend))
+ }
+}
+
+/// [`Revwalk::RevwalkCommits`] iterator using [`raw::Revwalk`].
+pub struct RevwalkCommits<'a> {
+ oids: RevwalkOids<'a>,
+ backend: &'a raw::Repository,
+}
+
+impl<'a> RevwalkCommits<'a> {
+ pub fn hide(&mut self, oid: Oid) -> Result<(), error::Oids> {
+ self.oids.hide(oid)
+ }
+
+ fn read(backend: &raw::Repository, oid: Oid) -> Result<Commit, error::Commit> {
+ let odb = backend.odb().map_err(error::Commit::backend)?;
+ let obj = odb.read(oid.into()).map_err(error::Commit::backend)?;
+ Commit::from_bytes(obj.data()).map_err(|e| error::Commit::Parse { oid, source: e })
+ }
+}
+
+impl Iterator for RevwalkCommits<'_> {
+ type Item = Result<Commit, error::Commit>;
+
+ fn next(&mut self) -> Option<Self::Item> {
+ let oid = match self.oids.next()? {
+ Ok(oid) => oid,
+ Err(e) => return Some(Err(error::Commit::backend(e))),
+ };
+ Some(Self::read(self.backend, oid))
+ }
+}
+
+/// Configure a [`raw::Revwalk`] from a [`RevwalkPlan`].
+fn configure_revwalk(walk: &mut raw::Revwalk<'_>, plan: &RevwalkPlan) -> Result<(), error::Init> {
+ let sort = match plan.sort_order() {
+ SortOrder::Chronological { reverse: false } => git::raw::Sort::TIME,
+ SortOrder::Topological { reverse: false } => git::raw::Sort::TOPOLOGICAL,
+ SortOrder::Chronological { reverse: true } => git::raw::Sort::REVERSE,
+ SortOrder::Topological { reverse: true } => {
+ git::raw::Sort::TOPOLOGICAL | git::raw::Sort::REVERSE
+ }
+ };
+ walk.set_sorting(sort).map_err(error::Init::backend)?;
+
+ if let Some((from, to)) = plan.range_bounds() {
+ walk.push_range(&format!("{from}..{to}"))
+ .map_err(error::Init::backend)?;
+ }
+
+ for oid in plan.starts() {
+ walk.push((*oid).into()).map_err(error::Init::backend)?;
+ }
+
+ for oid in plan.hidden() {
+ walk.hide((*oid).into()).map_err(error::Init::backend)?;
+ }
+
+ Ok(())
+}
+
+impl Revwalk for raw::Repository {
+ type RevwalkOids<'a> = RevwalkOids<'a>;
+ type RevwalkCommits<'a> = RevwalkCommits<'a>;
+
+ fn revwalk_oids<'a>(
+ &'a self,
+ plan: &RevwalkPlan,
+ ) -> Result<Self::RevwalkOids<'a>, error::Init> {
+ let mut walk = self.revwalk().map_err(error::Init::backend)?;
+ configure_revwalk(&mut walk, plan)?;
+ Ok(RevwalkOids { inner: walk })
+ }
+
+ fn revwalk_commits<'a>(
+ &'a self,
+ plan: &RevwalkPlan,
+ ) -> Result<Self::RevwalkCommits<'a>, error::Init> {
+ let mut walk = self.revwalk().map_err(error::Init::backend)?;
+ configure_revwalk(&mut walk, plan)?;
+ Ok(RevwalkCommits {
+ oids: RevwalkOids { inner: walk },
+ backend: self,
+ })
+ }
+}
commit 3ef22cf4efe5a39bb1e62d47a05fc1881ab81474
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Sun Apr 12 07:21:55 2026 +0000
radicle/git/repository: Define Revwalk trait
Provides revision walk operations for walking over a commit graph.
There are two methods:
- `revwalk_oids`: returns an iterator of `Oid`s of the commit graph,
- `revwalk_commits`: returns an iterator of `CommitData` of the commit graph.
The `RevwalkPlan` describes a builder for translating into the
adapters revision walk builder.
diff --git a/crates/radicle/src/git/repository.rs b/crates/radicle/src/git/repository.rs
index aedd59005..aa7f2d7ce 100644
--- a/crates/radicle/src/git/repository.rs
+++ b/crates/radicle/src/git/repository.rs
@@ -7,13 +7,16 @@
//! - [`types`] — Git domain types, i.e. Blob, Commit, TreeEntry, etc.
//! - [`object`] — The Git object store; providing read and write capabilities of Git objects.
//! - [`reference`] — The Git reference store; providing read and write capabilities of Git references.
+//! - [`revwalk`] – Git commit graph walk operations, i.e. "revwalk".
//!
//! [`reference`]: self::reference
pub mod ancestry;
pub mod object;
pub mod reference;
+pub mod revwalk;
pub mod types;
pub use ancestry::{AheadBehind, Ancestry};
+pub use revwalk::{Revwalk, RevwalkPlan, SortOrder};
pub use types::{Blob, Commit, ObjectKind, TreeEntry};
diff --git a/crates/radicle/src/git/repository/revwalk.rs b/crates/radicle/src/git/repository/revwalk.rs
new file mode 100644
index 000000000..f7c8372d6
--- /dev/null
+++ b/crates/radicle/src/git/repository/revwalk.rs
@@ -0,0 +1,143 @@
+//! Git commit graph walk trait.
+//!
+//! [`Revwalk`] provides commit iterators, given a [`RevwalkPlan`].
+
+pub mod error;
+
+use radicle_oid::Oid;
+
+use super::types::Commit;
+
+/// The sort order for a [`RevwalkPlan`].
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum SortOrder {
+ /// Chronological order (newest first, by commit time).
+ Chronological {
+ /// Setting `reverse` to `true` will sort in reverse-chronological
+ /// order (oldest first, by commit time).
+ reverse: bool,
+ },
+ /// Topological order (parents before children).
+ Topological {
+ /// Setting `reverse` to `true` will sort in reverse-topological order
+ /// (children before parents).
+ reverse: bool,
+ },
+}
+
+impl Default for SortOrder {
+ fn default() -> Self {
+ Self::Chronological { reverse: false }
+ }
+}
+
+/// A plan for walking the commit graph.
+///
+/// Accumulates configuration (start points, hidden commits, sort order)
+/// and is finalised by passing it to an [`Revwalk`] implementation.
+#[derive(Clone, Debug, Default)]
+pub struct RevwalkPlan {
+ start: Vec<Oid>,
+ hide: Vec<Oid>,
+ range: Option<(Oid, Oid)>,
+ sort: SortOrder,
+}
+
+impl RevwalkPlan {
+ /// Create a default walk, that walks all commits in chronological order.
+ pub fn new() -> Self {
+ Self::default()
+ }
+
+ /// Add a starting point for the walk.
+ pub fn push(mut self, oid: Oid) -> Self {
+ self.start.push(oid);
+ self
+ }
+
+ /// Exclude commits reachable from this [`Oid`].
+ pub fn hide(mut self, oid: Oid) -> Self {
+ self.hide.push(oid);
+ self
+ }
+
+ /// Walk only commits in the range `from..to` (commits reachable from
+ /// `to` but not from `from`).
+ pub fn range(mut self, from: Oid, to: Oid) -> Self {
+ self.range = Some((from, to));
+ self
+ }
+
+ /// Set the sort order for the walk.
+ pub fn sort(mut self, order: SortOrder) -> Self {
+ self.sort = order;
+ self
+ }
+
+ /// The starting points for the walk.
+ pub fn starts(&self) -> &[Oid] {
+ &self.start
+ }
+
+ /// The commits to hide (exclude reachable commits).
+ pub fn hidden(&self) -> &[Oid] {
+ &self.hide
+ }
+
+ /// The range, if set.
+ pub fn range_bounds(&self) -> Option<(Oid, Oid)> {
+ self.range
+ }
+
+ /// The sort order.
+ pub fn sort_order(&self) -> SortOrder {
+ self.sort
+ }
+}
+
+/// Git commit graph walks.
+pub trait Revwalk {
+ /// Iterator of commit [`Oid`]s.
+ type RevwalkOids<'a>: Iterator<Item = Result<Oid, error::Oids>> + 'a
+ where
+ Self: 'a;
+
+ /// Iterator of [`Commit`]s.
+ type RevwalkCommits<'a>: Iterator<Item = Result<Commit, error::Commit>> + 'a
+ where
+ Self: 'a;
+
+ /// Execute a revwalk plan, returning an iterator of commit [`Oid`]s.
+ ///
+ /// The returned iterator yields [`Oids`] for per-step failures:
+ /// - [`Oids::Backend`]: An unexpected error during iteration.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error when initialising the walk.
+ ///
+ /// [`Backend`]: error::Init::Backend
+ /// [`Oids`]: error::Oids
+ /// [`Oids::Backend`]: error::Oids::Backend
+ fn revwalk_oids<'a>(&'a self, plan: &RevwalkPlan)
+ -> Result<Self::RevwalkOids<'a>, error::Init>;
+
+ /// Execute a revwalk plan, returning an iterator of full [`Commit`] data.
+ ///
+ /// More expensive than [`Self::revwalk_oids`] since each commit is fully
+ /// parsed during iteration.
+ ///
+ /// The returned iterator yields [`error::Commit`] for per-step failures:
+ /// - [`error::Commit::Parse`]: A commit's raw bytes could not be parsed.
+ /// - [`error::Commit::Backend`]: An unexpected error during iteration.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error when initialising the walk.
+ ///
+ /// [`Backend`]: error::Init::Backend
+ fn revwalk_commits<'a>(
+ &'a self,
+ plan: &RevwalkPlan,
+ ) -> Result<Self::RevwalkCommits<'a>, error::Init>;
+}
diff --git a/crates/radicle/src/git/repository/revwalk/error.rs b/crates/radicle/src/git/repository/revwalk/error.rs
new file mode 100644
index 000000000..b9e087161
--- /dev/null
+++ b/crates/radicle/src/git/repository/revwalk/error.rs
@@ -0,0 +1,74 @@
+//! Errors returned by [`Revwalk`] methods and iterators.
+//!
+//! [`Revwalk`]: super::Revwalk
+
+use radicle_oid::Oid;
+use thiserror::Error;
+
+/// Error returned by [`Revwalk::revwalk_oids`] and
+/// [`Revwalk::revwalk_commits`] when initialising the walk.
+///
+/// [`Revwalk::revwalk_oids`]: super::Revwalk::revwalk_oids
+/// [`Revwalk::revwalk_commits`]: super::Revwalk::revwalk_commits
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Init {
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Init {
+ pub fn backend<E>(err: E) -> Self
+ where
+ E: std::error::Error + Send + Sync + 'static,
+ {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error yielded by the [`Revwalk::RevwalkOids`] iterator.
+///
+/// [`Revwalk::RevwalkOids`]: super::Revwalk::RevwalkOids
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Oids {
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Oids {
+ pub fn backend<E>(err: E) -> Self
+ where
+ E: std::error::Error + Send + Sync + 'static,
+ {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error yielded by the [`Revwalk::RevwalkCommits`] iterator.
+///
+/// [`Revwalk::RevwalkCommits`]: super::Revwalk::RevwalkCommits
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Commit {
+ /// Failed to parse the raw commit bytes.
+ #[error("failed to parse commit '{oid}': {source}")]
+ Parse {
+ oid: Oid,
+ source: radicle_git_metadata::commit::ParseError,
+ },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Commit {
+ pub fn backend<E>(err: E) -> Self
+ where
+ E: std::error::Error + Send + Sync + 'static,
+ {
+ Self::Backend(Box::new(err))
+ }
+}
commit ce38b1c5868e0994707eb89cd84ac86be0fcc339
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Sun Apr 12 07:21:55 2026 +0000
radicle/git/repository: Define Ancestry trait
Provides ancestry operations for ancestry checks, merge base check.
diff --git a/crates/radicle/src/git/repository.rs b/crates/radicle/src/git/repository.rs
index 7f95a69f1..aedd59005 100644
--- a/crates/radicle/src/git/repository.rs
+++ b/crates/radicle/src/git/repository.rs
@@ -3,14 +3,17 @@
//! Provides a library-agnostic interface for git repository operations,
//! separating concerns into:
//!
+//! - [`ancestry`] – Git ancestry operations.
//! - [`types`] — Git domain types, i.e. Blob, Commit, TreeEntry, etc.
//! - [`object`] — The Git object store; providing read and write capabilities of Git objects.
//! - [`reference`] — The Git reference store; providing read and write capabilities of Git references.
//!
//! [`reference`]: self::reference
+pub mod ancestry;
pub mod object;
pub mod reference;
pub mod types;
+pub use ancestry::{AheadBehind, Ancestry};
pub use types::{Blob, Commit, ObjectKind, TreeEntry};
diff --git a/crates/radicle/src/git/repository/ancestry.rs b/crates/radicle/src/git/repository/ancestry.rs
new file mode 100644
index 000000000..ca5f353e5
--- /dev/null
+++ b/crates/radicle/src/git/repository/ancestry.rs
@@ -0,0 +1,56 @@
+//! Git commit graph ancestry trait.
+//!
+//! [`Ancestry`] provides merge-base, ancestor checks, and ahead/behind counts.
+
+pub mod error;
+
+use radicle_oid::Oid;
+
+/// The result of [`Ancestry::ahead_behind`].
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+pub struct AheadBehind {
+ /// The given commit was ahead of the upstream by this many commits.
+ pub ahead: usize,
+ /// The given commit was behind the upstream by this many commits.
+ pub behind: usize,
+}
+
+/// Git commit graph operations.
+///
+/// Provides merge-base computation and ancestor checks.
+pub trait Ancestry {
+ /// Find the merge base (common ancestor) of two commits.
+ ///
+ /// Returns `Ok(None)` if there is no common ancestor.
+ ///
+ /// # Errors
+ ///
+ /// - [`CommitNotFound`]: One of the commits was not found.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`CommitNotFound`]: error::MergeBase::CommitNotFound
+ /// [`Backend`]: error::MergeBase::Backend
+ fn merge_base(&self, a: Oid, b: Oid) -> Result<Option<Oid>, error::MergeBase>;
+
+ /// Check whether `ancestor` is an ancestor of `head`.
+ ///
+ /// # Errors
+ ///
+ /// - [`CommitNotFound`]: One of the commits was not found.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`CommitNotFound`]: error::IsAncestor::CommitNotFound
+ /// [`Backend`]: error::IsAncestor::Backend
+ fn is_ancestor(&self, ancestor: Oid, head: Oid) -> Result<bool, error::IsAncestor>;
+
+ /// Count how many commits `commit` is ahead of and behind `upstream`.
+ ///
+ /// # Errors
+ ///
+ /// - [`CommitNotFound`]: One of the commits was not found.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`CommitNotFound`]: error::AheadBehind::CommitNotFound
+ /// [`Backend`]: error::AheadBehind::Backend
+ fn ahead_behind(&self, commit: Oid, upstream: Oid) -> Result<AheadBehind, error::AheadBehind>;
+}
diff --git a/crates/radicle/src/git/repository/ancestry/error.rs b/crates/radicle/src/git/repository/ancestry/error.rs
new file mode 100644
index 000000000..a04ccc9cd
--- /dev/null
+++ b/crates/radicle/src/git/repository/ancestry/error.rs
@@ -0,0 +1,75 @@
+//! Errors returned by [`Ancestry`] methods.
+//!
+//! [`Ancestry`]: super::Ancestry
+
+use radicle_oid::Oid;
+use thiserror::Error;
+
+/// Error returned by [`Ancestry::merge_base`].
+///
+/// [`Ancestry::merge_base`]: super::Ancestry::merge_base
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum MergeBase {
+ /// One of the commits could not be found
+ #[error("failed to find commit '{oid}' during merge base calculation")]
+ CommitNotFound { oid: Oid },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl MergeBase {
+ pub fn backend<E>(err: E) -> Self
+ where
+ E: std::error::Error + Send + Sync + 'static,
+ {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Ancestry::is_ancestor`].
+///
+/// [`Ancestry::is_ancestor`]: super::Ancestry::is_ancestor
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum IsAncestor {
+ /// One of the commits could not be found.
+ #[error("failed to find commit '{oid}'")]
+ CommitNotFound { oid: Oid },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl IsAncestor {
+ pub fn backend<E>(err: E) -> Self
+ where
+ E: std::error::Error + Send + Sync + 'static,
+ {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Ancestry::ahead_behind`].
+///
+/// [`Ancestry::ahead_behind`]: super::Ancestry::ahead_behind
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum AheadBehind {
+ /// One of the commits was not found.
+ #[error("commit '{oid}' was not found")]
+ CommitNotFound { oid: Oid },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl AheadBehind {
+ pub fn backend<E>(err: E) -> Self
+ where
+ E: std::error::Error + Send + Sync + 'static,
+ {
+ Self::Backend(Box::new(err))
+ }
+}
commit 56f023496f4d8cafe7ffb378a93fe41c4c411cb4
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Sun Apr 12 07:19:50 2026 +0000
radicle/git/repository: Define reference::Reader, reference::Writer, symbolic::Writer
Introduce the reference reader, writer, and symbolic extension trait for Git
reference databases.
The reader captures resolving reference targets, and listing references.
The writers capture writing and deleting direct references, an
extension trait for writing a symbolic reference.
diff --git a/crates/radicle/src/git/repository/reference.rs b/crates/radicle/src/git/repository/reference.rs
index 439f52ac2..81f3fea8e 100644
--- a/crates/radicle/src/git/repository/reference.rs
+++ b/crates/radicle/src/git/repository/reference.rs
@@ -1 +1,187 @@
//! Git reference operations.
+//!
+//! The module provides the following traits:
+//! - [`Reader`] for reading references,
+//! - [`Writer`] for writing references, and
+//! - [`symbolic::Writer`], which extends [`Writer`], for writing symbolic references.
+
+pub mod error;
+pub mod symbolic;
+
+use radicle_oid::Oid;
+
+use radicle_git_ref_format::refspec::PatternStr;
+use radicle_git_ref_format::{Qualified, RefStr};
+
+/// Read Git references.
+///
+/// # Target Resolution
+///
+/// Direct references point to a target [`Oid`]. For most references, this is a
+/// commit object. In the case of annotated tags, this will be a tag object.
+/// In both cases, the target returned will be a commit [`Oid`]; where, in the
+/// case of an annotated tag, it is the commit of the tag itself.
+///
+/// Symbolic references point to another reference. These references are peeled
+/// until they find the target [`Oid`] of a direct reference.
+pub trait Reader {
+ type References<'a>: Iterator<Item = Result<(Qualified<'static>, Oid), error::read::ListReference>>
+ + 'a
+ where
+ Self: 'a;
+
+ /// Resolve a reference to its target [`Oid`].
+ ///
+ /// Returns `None` if the reference does not exist.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`Backend`]: error::read::RefTarget::Backend
+ fn ref_target<R>(&self, name: &R) -> Result<Option<Oid>, error::read::RefTarget>
+ where
+ R: AsRef<RefStr>;
+
+ /// Resolve a reference to its target [`Oid`], returning an error if it does
+ /// not exist.
+ ///
+ /// # Errors
+ ///
+ /// - [`NotFound`]: The reference identified by `name` was not found.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`NotFound`]: error::read::RefTarget::NotFound
+ /// [`Backend`]: error::read::RefTarget::Backend
+ fn try_ref_target<R>(&self, name: &R) -> Result<Oid, error::read::RefTarget>
+ where
+ R: AsRef<RefStr>,
+ {
+ self.ref_target(name)?
+ .ok_or_else(|| error::read::RefTarget::NotFound(name.as_ref().to_ref_string()))
+ }
+
+ /// List all references matching a glob pattern.
+ ///
+ /// Each reference is parsed and peeled to its target commit. If either of
+ /// these operations fails, it is returned in the iterator. The caller may
+ /// choose to log these failures and skip the entry.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error when initialising the reference
+ /// iterator.
+ ///
+ /// The iterator itself yields [`ListReference`] for per-reference
+ /// failures:
+ /// - [`Parse`]: A reference name could not be parsed as a [`Qualified`].
+ /// - [`Peel`]: A reference could not be peeled to a target commit.
+ /// - [`ListReference::Backend`]: An unexpected error during iteration.
+ ///
+ /// [`Backend`]: error::read::ListRefs::Backend
+ /// [`ListReference`]: error::read::ListReference
+ /// [`Parse`]: error::read::ListReference::Parse
+ /// [`Peel`]: error::read::ListReference::Peel
+ /// [`ListReference::Backend`]: error::read::ListReference::Backend
+ fn list_refs<'a, P>(
+ &'a self,
+ pattern: &P,
+ ) -> Result<Self::References<'a>, error::read::ListRefs>
+ where
+ P: AsRef<PatternStr>;
+}
+
+/// The mode of operation for writing a reference.
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+pub enum Target {
+ /// Set the reference to the given `target`, only if the reference does not
+ /// already exist.
+ Create { target: Oid },
+ /// Set the reference to the given `target`, the reference may exist
+ /// already.
+ Upsert { target: Oid },
+ /// Set the reference to the given `target`, only if the reference's
+ /// current value matches `expected`.
+ Cas { target: Oid, expected: Oid },
+}
+
+impl Target {
+ /// Construct the [`Create`] variant, which creates a new reference pointing
+ /// to the `target`. This variant will only succeed if the reference
+ /// pointing to `target` does not already exist.
+ ///
+ /// [`Create`]: Target::Create
+ pub fn create(target: Oid) -> Self {
+ Self::Create { target }
+ }
+
+ /// Construct the [`Upsert`] variant, which creates a new reference pointing
+ /// to the `target`. This variant will succeed even if the reference
+ /// pointing to `target` already exists.
+ ///
+ /// [`Upsert`]: Target::Upsert
+ pub fn upsert<R>(target: Oid) -> Self
+ where
+ R: AsRef<RefStr>,
+ {
+ Self::Upsert { target }
+ }
+
+ /// Construct the [`Cas`] variant, which creates a new reference pointing to
+ /// the `target`. This variant will succeed only when the `expected` value
+ /// matches the previously existing target value.
+ ///
+ /// [`Cas`]: Target::Cas
+ pub fn cas(target: Oid, expected: Oid) -> Self {
+ Self::Cas { target, expected }
+ }
+
+ /// The target [`Oid`] that the reference should point to after the write.
+ pub fn target(&self) -> Oid {
+ match self {
+ Self::Create { target } | Self::Upsert { target } | Self::Cas { target, .. } => *target,
+ }
+ }
+}
+
+/// Write Git references.
+pub trait Writer {
+ /// Set a reference to the given [`Target`].
+ ///
+ /// # Errors
+ ///
+ /// - [`MissingTarget`]: The target [`Oid`] does not exist in the object
+ /// database.
+ /// - [`ReferenceExists`]: The reference already exists (for
+ /// [`Target::Create`]).
+ /// - [`CasFailed`]: The reference's current value did not match the
+ /// expected value (for [`Target::Cas`]).
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`MissingTarget`]: error::write::WriteRef::MissingTarget
+ /// [`ReferenceExists`]: error::write::WriteRef::ReferenceExists
+ /// [`CasFailed`]: error::write::WriteRef::CasFailed
+ /// [`Backend`]: error::write::WriteRef::Backend
+ fn write_ref<R>(
+ &self,
+ name: &R,
+ target: Target,
+ reflog: &str,
+ ) -> Result<(), error::write::WriteRef>
+ where
+ R: AsRef<RefStr>;
+
+ /// Delete a reference from the Git repository.
+ ///
+ /// This operation must be idempotent, i.e. successive deletes of the same
+ /// reference name must succeed.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`Backend`]: error::write::DeleteRef::Backend
+ fn delete_ref<R>(&self, name: &R) -> Result<(), error::write::DeleteRef>
+ where
+ R: AsRef<RefStr>;
+}
diff --git a/crates/radicle/src/git/repository/reference/error.rs b/crates/radicle/src/git/repository/reference/error.rs
new file mode 100644
index 000000000..fd3e27c15
--- /dev/null
+++ b/crates/radicle/src/git/repository/reference/error.rs
@@ -0,0 +1,4 @@
+//! Errors for Git reference operations, namespaced by read and write.
+
+pub mod read;
+pub mod write;
diff --git a/crates/radicle/src/git/repository/reference/error/read.rs b/crates/radicle/src/git/repository/reference/error/read.rs
new file mode 100644
index 000000000..ec8dfa78d
--- /dev/null
+++ b/crates/radicle/src/git/repository/reference/error/read.rs
@@ -0,0 +1,72 @@
+//! Errors returned by [`Reader`] methods.
+//!
+//! [`Reader`]: super::super::Reader
+
+use radicle_git_ref_format::RefString;
+use thiserror::Error;
+
+/// Error returned by [`Reader::ref_target`].
+///
+/// [`Reader::ref_target`]: super::super::Reader::ref_target
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum RefTarget {
+ /// The requested reference was not found.
+ #[error("failed to find reference '{0}'")]
+ NotFound(RefString),
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl RefTarget {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Reader::list_refs`].
+///
+/// [`Reader::list_refs`]: super::super::Reader::list_refs
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum ListRefs {
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl ListRefs {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error yielded by the [`Reader::list_refs`] iterator.
+///
+/// [`Reader::list_refs`]: super::super::Reader::list_refs
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum ListReference {
+ /// The reference database provided a malformed reference name.
+ #[error("failed to parse reference '{name}': {source}")]
+ Parse {
+ name: String,
+ source: radicle_git_ref_format::Error,
+ },
+ /// The reference could not be peeled to a target commit.
+ #[error("failed to peel '{name}' to target commit: {source}")]
+ Peel {
+ name: radicle_git_ref_format::Qualified<'static>,
+ source: Box<dyn std::error::Error + Send + Sync + 'static>,
+ },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl ListReference {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
diff --git a/crates/radicle/src/git/repository/reference/error/write.rs b/crates/radicle/src/git/repository/reference/error/write.rs
new file mode 100644
index 000000000..a654e04c7
--- /dev/null
+++ b/crates/radicle/src/git/repository/reference/error/write.rs
@@ -0,0 +1,86 @@
+//! Errors returned by [`Writer`] and [`symbolic::Writer`] methods.
+//!
+//! [`Writer`]: super::super::Writer
+//! [`symbolic::Writer`]: super::super::symbolic::Writer
+
+use radicle_git_ref_format::RefString;
+use radicle_oid::Oid;
+use thiserror::Error;
+
+/// Error returned by [`Writer::write_ref`].
+///
+/// [`Writer::write_ref`]: super::super::Writer::write_ref
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum WriteRef {
+ /// Compare-and-swap failed.
+ #[error(
+ "failed to update reference '{name}' due to compare-and-swap failure with expected value {expected}"
+ )]
+ CasFailed { name: String, expected: Oid },
+ /// The target OID does not exist in the object database.
+ #[error("target object {target} not found when writing reference `{name}`")]
+ MissingTarget { name: String, target: Oid },
+ /// The reference already exists (for create-only writes).
+ #[error("reference '{name}' already exists")]
+ ReferenceExists { name: String },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl WriteRef {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Writer::delete_ref`].
+///
+/// [`Writer::delete_ref`]: super::super::Writer::delete_ref
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum DeleteRef {
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl DeleteRef {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Writer::write_symbolic_ref`].
+///
+/// [`Writer::write_symbolic_ref`]: super::super::symbolic::Writer::write_symbolic_ref
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum WriteSymbolicRef {
+ /// The target reference does not exist.
+ #[error("could not create symbolic reference '{name}' due to missing target '{target}'")]
+ MissingTarget { name: RefString, target: RefString },
+ /// The named reference already exists.
+ #[error(
+ "could not create symbolic reference from '{name}' to '{target}', the reference already exists"
+ )]
+ ReferenceExists { name: RefString, target: RefString },
+ /// Compare-and-swap failed.
+ #[error(
+ "failed to update reference '{name}' due to compare-and-swap failure with expected value {expected}"
+ )]
+ CasFailed {
+ name: RefString,
+ expected: RefString,
+ },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl WriteSymbolicRef {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
diff --git a/crates/radicle/src/git/repository/reference/symbolic.rs b/crates/radicle/src/git/repository/reference/symbolic.rs
new file mode 100644
index 000000000..0dbc41a6f
--- /dev/null
+++ b/crates/radicle/src/git/repository/reference/symbolic.rs
@@ -0,0 +1,115 @@
+//! Git symbolic reference operations.
+//!
+//! The module provides the following traits:
+//! - [`Writer`] for writing symbolic references.
+
+use radicle_git_ref_format::{RefStr, RefString};
+
+use super::error;
+
+/// The mode of operation for writing a symbolic reference.
+///
+/// See [`Writer::write_symbolic_ref`].
+#[derive(Clone, Debug, PartialEq, Eq)]
+pub enum Target {
+ /// Set the reference to the given `target`, only if the reference does not
+ /// already exist.
+ Create { target: RefString },
+ /// Set the reference to the given `target`, the reference may exist
+ /// already.
+ Upsert { target: RefString },
+ /// Set the reference to the given `target`, only if the current value of
+ /// the reference matches `expected`.
+ Cas {
+ target: RefString,
+ expected: RefString,
+ },
+}
+
+impl Target {
+ /// Construct the [`Create`] variant, which creates a new symbolic reference
+ /// pointing to the `target`. This variant will only succeed if the
+ /// reference pointing to `target` does not already exist.
+ ///
+ /// [`Create`]: Target::Create
+ pub fn create<R>(target: R) -> Self
+ where
+ R: AsRef<RefStr>,
+ {
+ Self::Create {
+ target: target.as_ref().to_ref_string(),
+ }
+ }
+
+ /// Construct the [`Upsert`] variant, which creates a new symbolic reference
+ /// pointing to the `target`. This variant will succeed even if the
+ /// reference pointing to `target` already exists.
+ ///
+ /// [`Upsert`]: Target::Upsert
+ pub fn upsert<R>(target: R) -> Self
+ where
+ R: AsRef<RefStr>,
+ {
+ Self::Upsert {
+ target: target.as_ref().to_ref_string(),
+ }
+ }
+
+ /// Construct the [`Cas`] variant, which creates a new symbolic reference
+ /// pointing to the `target`. This variant will succeed only when the
+ /// `expected` value matches the previously existing target value.
+ ///
+ /// [`Cas`]: Target::Cas
+ pub fn cas<T, E>(target: T, expected: E) -> Self
+ where
+ T: AsRef<RefStr>,
+ E: AsRef<RefStr>,
+ {
+ Self::Cas {
+ target: target.as_ref().to_ref_string(),
+ expected: expected.as_ref().to_ref_string(),
+ }
+ }
+
+ /// The target [`RefString`] that the symbolic reference should point to
+ /// after the write.
+ pub fn target(&self) -> &RefString {
+ match self {
+ Self::Create { target } | Self::Upsert { target } | Self::Cas { target, .. } => target,
+ }
+ }
+}
+
+/// Extension trait for symbolic reference support.
+///
+/// A symbolic reference is one that points to another reference name rather
+/// than directly to an [`Oid`] (e.g. `HEAD → refs/heads/main`).
+///
+/// [`Oid`]: radicle_oid::Oid
+pub trait Writer: super::Writer {
+ /// Create or update a symbolic reference, identified by `name`, with the
+ /// given [`Target`].
+ ///
+ /// # Errors
+ ///
+ /// - [`MissingTarget`]: The target reference does not exist in the
+ /// reference database.
+ /// - [`ReferenceExists`]: The symbolic reference `name` already exists
+ /// (for [`Target::Create`]).
+ /// - [`CasFailed`]: The current target did not match the expected value
+ /// (for [`Target::Cas`]).
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`MissingTarget`]: error::write::WriteSymbolicRef::MissingTarget
+ /// [`ReferenceExists`]: error::write::WriteSymbolicRef::ReferenceExists
+ /// [`CasFailed`]: error::write::WriteSymbolicRef::CasFailed
+ /// [`Backend`]: error::write::WriteSymbolicRef::Backend
+ fn write_symbolic_ref<R>(
+ &self,
+ name: &R,
+ target: Target,
+ reflog: &str,
+ ) -> Result<(), error::write::WriteSymbolicRef>
+ where
+ R: AsRef<RefStr>;
+}
commit 9f07fdef369a6d6f6751869e17fcfe2d21e0d226
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Sun Apr 12 07:18:52 2026 +0000
radicle/git/repository: Define object::Reader and object::Writer traits
Introduce the object reader and writer traits for Git object databases.
The reader captures methods for reading blobs and commits, as well as
checking the existence of objects.
The writer captures methods for writing blobs, trees, and commits.
diff --git a/crates/radicle/src/git/repository/object.rs b/crates/radicle/src/git/repository/object.rs
index 745082222..b4983855a 100644
--- a/crates/radicle/src/git/repository/object.rs
+++ b/crates/radicle/src/git/repository/object.rs
@@ -1 +1,176 @@
//! Git object database abstraction.
+//!
+//! The module provides two traits:
+//! - [`Reader`] for reading objects, and
+//! - [`Writer`] for writing objects
+
+pub mod error;
+
+use std::path::Path;
+
+use radicle_oid::Oid;
+
+use super::types::{Blob, Commit, TreeEntry};
+
+/// A handle for reading Git objects from the Git object database.
+pub trait Reader {
+ /// Find a blob by its [`Oid`].
+ ///
+ /// Returns `None` if the blob does not exist.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`Backend`]: error::read::Blob::Backend
+ fn blob(&self, oid: Oid) -> Result<Option<Blob>, error::read::Blob>;
+
+ /// Find a blob by its [`Oid`], returning an error if it does not exist.
+ ///
+ /// # Errors
+ ///
+ /// - [`NotFound`]: The blob identified by `oid` does not exist.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`NotFound`]: error::read::Blob::NotFound
+ /// [`Backend`]: error::read::Blob::Backend
+ fn try_blob(&self, oid: Oid) -> Result<Blob, error::read::Blob> {
+ self.blob(oid)?.ok_or(error::read::Blob::NotFound { oid })
+ }
+
+ /// Find a blob at a `path` within a commit's tree.
+ ///
+ /// Returns `None` if the path does not exist in the commit's tree.
+ ///
+ /// # Errors
+ ///
+ /// - [`CommitNotFound`]: The commit identified by `commit` does not exist.
+ /// - [`Tree`]: Failed to get the commit's tree.
+ /// - [`TreeEntry`]: Failed to look up the entry at `path` in the tree.
+ /// - [`Object`]: The entry was found but failed to resolve to an object.
+ /// - [`TypeMismatch`]: The resolved object is not a blob.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`CommitNotFound`]: error::read::BlobAt::CommitNotFound
+ /// [`Tree`]: error::read::BlobAt::Tree
+ /// [`TreeEntry`]: error::read::BlobAt::TreeEntry
+ /// [`Object`]: error::read::BlobAt::Object
+ /// [`TypeMismatch`]: error::read::BlobAt::TypeMismatch
+ /// [`Backend`]: error::read::BlobAt::Backend
+ fn blob_at<P>(&self, commit: Oid, path: &P) -> Result<Option<Blob>, error::read::BlobAt>
+ where
+ P: AsRef<Path>;
+
+ /// Find a blob at a `path` within a commit's tree, returning an error if
+ /// the path does not exist.
+ ///
+ /// # Errors
+ ///
+ /// - [`CommitNotFound`]: The commit identified by `commit` does not exist.
+ /// - [`MissingBlob`]: The path does not exist in the commit's tree.
+ /// - [`Tree`]: Failed to get the commit's tree.
+ /// - [`TreeEntry`]: Failed to look up the entry at `path` in the tree.
+ /// - [`Object`]: The entry was found but failed to resolve to an object.
+ /// - [`TypeMismatch`]: The resolved object is not a blob.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`CommitNotFound`]: error::read::BlobAt::CommitNotFound
+ /// [`MissingBlob`]: error::read::BlobAt::MissingBlob
+ /// [`Tree`]: error::read::BlobAt::Tree
+ /// [`TreeEntry`]: error::read::BlobAt::TreeEntry
+ /// [`Object`]: error::read::BlobAt::Object
+ /// [`TypeMismatch`]: error::read::BlobAt::TypeMismatch
+ /// [`Backend`]: error::read::BlobAt::Backend
+ fn try_blob_at<P>(&self, commit: Oid, path: &P) -> Result<Blob, error::read::BlobAt>
+ where
+ P: AsRef<Path>,
+ {
+ self.blob_at(commit, path)?
+ .ok_or_else(|| error::read::BlobAt::MissingBlob {
+ commit,
+ path: path.as_ref().to_path_buf(),
+ })
+ }
+
+ /// Read a commit by its [`Oid`].
+ ///
+ /// Returns `None` if the commit does not exist.
+ ///
+ /// # Errors
+ ///
+ /// - [`Parse`]: The object was found but could not be parsed as a commit.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`Parse`]: error::read::Commit::Parse
+ /// [`Backend`]: error::read::Commit::Backend
+ fn commit(&self, oid: Oid) -> Result<Option<Commit>, error::read::Commit>;
+
+ /// Read a commit by its [`Oid`], returning an error if it does not exist.
+ ///
+ /// # Errors
+ ///
+ /// - [`NotFound`]: The commit identified by `oid` does not exist.
+ /// - [`Parse`]: The object was found but could not be parsed as a commit.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`NotFound`]: error::read::Commit::NotFound
+ /// [`Parse`]: error::read::Commit::Parse
+ /// [`Backend`]: error::read::Commit::Backend
+ fn try_commit(&self, oid: Oid) -> Result<Commit, error::read::Commit> {
+ self.commit(oid)?
+ .ok_or(error::read::Commit::NotFound { oid })
+ }
+
+ /// Check whether an object exists in the object database.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`Backend`]: error::read::Exists::Backend
+ fn exists(&self, oid: Oid) -> Result<bool, error::read::Exists>;
+}
+
+/// Write Git objects to the Git object database.
+///
+/// Every method returns the content-addressed [`Oid`] of the written object.
+pub trait Writer {
+ /// Write a blob given its raw bytes content.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`Backend`]: error::write::Blob::Backend
+ fn write_blob(&self, content: &[u8]) -> Result<Oid, error::write::Blob>;
+
+ /// Write a tree from a set of entries.
+ ///
+ /// [`TreeEntry::Blob`] entries have their content written as blobs first.
+ /// [`TreeEntry::BlobRef`] entries reference existing blobs by [`Oid`].
+ ///
+ /// # Errors
+ ///
+ /// - [`MissingBlob`]: A [`TreeEntry::BlobRef`] references an [`Oid`] that
+ /// does not exist in the object database.
+ /// - [`WriteBlob`]: Failed to write a blob for a [`TreeEntry::Blob`] entry.
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`MissingBlob`]: error::write::Tree::MissingBlob
+ /// [`WriteBlob`]: error::write::Tree::WriteBlob
+ /// [`Backend`]: error::write::Tree::Backend
+ fn write_tree(&self, entries: &[TreeEntry]) -> Result<Oid, error::write::Tree>;
+
+ /// Write a commit from raw bytes.
+ ///
+ /// The caller is responsible for producing valid Git commit bytes
+ /// (e.g. via [`radicle_git_metadata`]). This is necessary for signed
+ /// commits where the exact byte representation must be controlled.
+ ///
+ /// # Errors
+ ///
+ /// - [`Backend`]: An unexpected error from the underlying git library.
+ ///
+ /// [`Backend`]: error::write::Commit::Backend
+ fn write_commit(&self, bytes: &[u8]) -> Result<Oid, error::write::Commit>;
+}
diff --git a/crates/radicle/src/git/repository/object/error.rs b/crates/radicle/src/git/repository/object/error.rs
new file mode 100644
index 000000000..fbb348c4d
--- /dev/null
+++ b/crates/radicle/src/git/repository/object/error.rs
@@ -0,0 +1,4 @@
+//! Errors for Git object operations, namespaced by read and write.
+
+pub mod read;
+pub mod write;
diff --git a/crates/radicle/src/git/repository/object/error/read.rs b/crates/radicle/src/git/repository/object/error/read.rs
new file mode 100644
index 000000000..f61ada570
--- /dev/null
+++ b/crates/radicle/src/git/repository/object/error/read.rs
@@ -0,0 +1,123 @@
+//! Errors returned by [`Reader`] methods.
+//!
+//! [`Reader`]: super::super::Reader
+
+use std::path::PathBuf;
+
+use radicle_oid::Oid;
+use thiserror::Error;
+
+use crate::git::repository::types;
+
+/// Error returned by [`Reader::blob`].
+///
+/// [`Reader::blob`]: super::super::Reader::blob
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Blob {
+ /// The blob was not found.
+ #[error("failed to find blob '{oid}'")]
+ NotFound { oid: Oid },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Blob {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Reader::blob_at`].
+///
+/// [`Reader::blob_at`]: super::super::Reader::blob_at
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum BlobAt {
+ /// Failed to find the commit.
+ #[error("failed to find commit '{commit}' to retrieve blob at {path:?}")]
+ CommitNotFound { commit: Oid, path: PathBuf },
+ /// Failed to get the associated tree of the commit.
+ #[error("failed to get associated tree of the commit '{commit}'")]
+ Tree {
+ commit: Oid,
+ source: Box<dyn std::error::Error + Send + Sync + 'static>,
+ },
+ /// Failed to get the entry at `path` in the commit's tree.
+ #[error("failed to get tree entry {path:?} in the commit '{commit}'")]
+ TreeEntry {
+ commit: Oid,
+ path: PathBuf,
+ source: Box<dyn std::error::Error + Send + Sync + 'static>,
+ },
+ /// Failed to resolve the object at the given path.
+ #[error("failed to resolve the object at {path:?} in the commit '{commit}'")]
+ Object {
+ commit: Oid,
+ path: PathBuf,
+ source: Box<dyn std::error::Error + Send + Sync + 'static>,
+ },
+ /// The object exists but is not a blob.
+ #[error("object {oid} has type `{actual}`, expected `{expected}`")]
+ TypeMismatch {
+ oid: Oid,
+ expected: types::ObjectKind,
+ actual: String,
+ },
+ /// The path does not exist in the commit's tree.
+ #[error("the blob identified by {path:?} does not exist in the commit '{commit}'")]
+ MissingBlob { commit: Oid, path: PathBuf },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl BlobAt {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Reader::commit`].
+///
+/// [`Reader::commit`]: super::super::Reader::commit
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Commit {
+ /// The commit was not found.
+ #[error("failed to find commit '{oid}'")]
+ NotFound { oid: Oid },
+ /// Failed to parse the raw commit bytes.
+ #[error("failed to parse commit '{oid}': {source}")]
+ Parse {
+ oid: Oid,
+ source: radicle_git_metadata::commit::ParseError,
+ },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Commit {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Reader::exists`].
+///
+/// [`Reader::exists`]: super::super::Reader::exists
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Exists {
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Exists {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
diff --git a/crates/radicle/src/git/repository/object/error/write.rs b/crates/radicle/src/git/repository/object/error/write.rs
new file mode 100644
index 000000000..bf3d6f87a
--- /dev/null
+++ b/crates/radicle/src/git/repository/object/error/write.rs
@@ -0,0 +1,70 @@
+//! Errors returned by [`Writer`] methods.
+//!
+//! [`Writer`]: super::super::Writer
+
+use std::path::PathBuf;
+
+use radicle_oid::Oid;
+use thiserror::Error;
+
+/// Error returned by [`Writer::write_blob`].
+///
+/// [`Writer::write_blob`]: super::super::Writer::write_blob
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Blob {
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Blob {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Writer::write_tree`].
+///
+/// [`Writer::write_tree`]: super::super::Writer::write_tree
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Tree {
+ /// A `BlobRef` entry references an OID that does not exist.
+ #[error("blob reference '{oid}' does not exist in the object database")]
+ MissingBlob { oid: Oid },
+ /// Failed to write blob contents for a [`TreeEntry::Blob`] entry.
+ ///
+ /// [`TreeEntry::Blob`]: crate::git::repository::types::TreeEntry::Blob
+ #[error("failed to write blob contents to {path:?}")]
+ WriteBlob {
+ path: PathBuf,
+ source: Box<dyn std::error::Error + Send + Sync + 'static>,
+ },
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Tree {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
+
+/// Error returned by [`Writer::write_commit`].
+///
+/// [`Writer::write_commit`]: super::super::Writer::write_commit
+#[derive(Debug, Error)]
+#[non_exhaustive]
+pub enum Commit {
+ /// An error from the underlying git library.
+ #[error(transparent)]
+ Backend(Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Commit {
+ pub fn backend<E: std::error::Error + Send + Sync + 'static>(err: E) -> Self {
+ Self::Backend(Box::new(err))
+ }
+}
commit e6a563b42ea2955c95cefc1b6bd26c227695d2e6
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Sun Apr 12 07:04:27 2026 +0000
radicle/git/repository: Define Git domain types
Introduce `git::repository` module.
A skeleton is created for the submodules:
- `object`,
- `reference`, and
- `types`
The Git domain `types` are added in this change, and cover:
- `ObjectKind` – an enumeration of the Git object kinds.
- `Commit` – a type alias to `CommitData<Oid, Oid>`.
- `Blob` – a simple type capturing a blob's `Oid` and content.
- `TreeEntry` – an enum representing the inputs for writing a tree.
- `RefUpdate` – a type for representing batch updates of references
for Git repositories.
diff --git a/crates/radicle/src/git.rs b/crates/radicle/src/git.rs
index 6c5cceb6e..58ef8e9cb 100644
--- a/crates/radicle/src/git.rs
+++ b/crates/radicle/src/git.rs
@@ -1,5 +1,6 @@
pub mod canonical;
pub mod raw;
+pub mod repository;
use std::io;
use std::path::Path;
diff --git a/crates/radicle/src/git/repository.rs b/crates/radicle/src/git/repository.rs
new file mode 100644
index 000000000..7f95a69f1
--- /dev/null
+++ b/crates/radicle/src/git/repository.rs
@@ -0,0 +1,16 @@
+//! Git repository abstraction layer.
+//!
+//! Provides a library-agnostic interface for git repository operations,
+//! separating concerns into:
+//!
+//! - [`types`] — Git domain types, i.e. Blob, Commit, TreeEntry, etc.
+//! - [`object`] — The Git object store; providing read and write capabilities of Git objects.
+//! - [`reference`] — The Git reference store; providing read and write capabilities of Git references.
+//!
+//! [`reference`]: self::reference
+
+pub mod object;
+pub mod reference;
+pub mod types;
+
+pub use types::{Blob, Commit, ObjectKind, TreeEntry};
diff --git a/crates/radicle/src/git/repository/object.rs b/crates/radicle/src/git/repository/object.rs
new file mode 100644
index 000000000..745082222
--- /dev/null
+++ b/crates/radicle/src/git/repository/object.rs
@@ -0,0 +1 @@
+//! Git object database abstraction.
diff --git a/crates/radicle/src/git/repository/reference.rs b/crates/radicle/src/git/repository/reference.rs
new file mode 100644
index 000000000..439f52ac2
--- /dev/null
+++ b/crates/radicle/src/git/repository/reference.rs
@@ -0,0 +1 @@
+//! Git reference operations.
diff --git a/crates/radicle/src/git/repository/types.rs b/crates/radicle/src/git/repository/types.rs
new file mode 100644
index 000000000..165ac8582
--- /dev/null
+++ b/crates/radicle/src/git/repository/types.rs
@@ -0,0 +1,84 @@
+//! Domain types for Git repository operations.
+//!
+//! # Objects
+//!
+//! The following object types are defined in this module:
+//! - [`Blob`]
+//! - [`Commit`]
+//! - [`TreeEntry`]
+
+use core::fmt;
+use std::path::PathBuf;
+
+use radicle_git_metadata as metadata;
+use radicle_oid::Oid;
+
+/// An enumeration of the kinds of Git objects
+#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[non_exhaustive]
+pub enum ObjectKind {
+ /// A Git blob object.
+ Blob,
+ /// A Git tree object.
+ Tree,
+ /// A Git commit object.
+ Commit,
+ /// A Git tag object.
+ Tag,
+}
+
+impl fmt::Display for ObjectKind {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ match self {
+ ObjectKind::Blob => f.write_str("blob"),
+ ObjectKind::Tree => f.write_str("tree"),
+ ObjectKind::Commit => f.write_str("commit"),
+ ObjectKind::Tag => f.write_str("tag"),
+ }
+ }
+}
+
+/// A Git blob object.
+#[derive(Clone, Debug, PartialEq, Eq, Hash)]
+pub struct Blob {
+ /// The content-addressed identifier of the blob.
+ pub oid: Oid,
+ /// The blob's content.
+ pub content: Vec<u8>,
+}
+
+/// A Git commit, with all metadata parsed.
+///
+/// This is a type alias for [`radicle_git_metadata::commit::CommitData`]
+/// specialised to [`Oid`] for both tree and parent identifiers.
+pub type Commit = metadata::commit::CommitData<Oid, Oid>;
+
+/// An entry to be written into a Git tree.
+#[derive(Clone, Debug, PartialEq, Eq, Hash)]
+pub enum TreeEntry {
+ /// A blob entry with inline content.
+ ///
+ /// The contents of the blob must be written to the Git repository before
+ /// creating the tree entry.
+ Blob {
+ /// The path of the entry within the tree.
+ ///
+ /// Multi-component paths (e.g. `a/b/c.txt`) are supported;
+ /// intermediate sub-trees are created automatically.
+ path: PathBuf,
+ /// The contents of the blob.
+ content: Vec<u8>,
+ },
+ /// A reference to an existing blob by [`Oid`].
+ ///
+ /// Used when the blob already exists in the Git object database.
+ BlobRef {
+ /// The path of the entry within the tree.
+ ///
+ /// Multi-component paths (e.g. `a/b/c.txt`) are supported;
+ /// intermediate sub-trees are created automatically.
+ path: PathBuf,
+ /// The [`Oid`] of the existing blob.
+ oid: Oid,
+ },
+}
commit 99705f51a901c4b268881af76512ee5be76c6466
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Tue Apr 21 08:44:16 2026 +0100
sigrefs/git: Remove doc link of `Committer::stable`
The `Committer::stable` method is behind the `test` feature, or test build.
Do not link to it, so that it does not error for a regular build.
diff --git a/crates/radicle/src/storage/refs/sigrefs/git.rs b/crates/radicle/src/storage/refs/sigrefs/git.rs
index 6a4152911..4b1c7d6bc 100644
--- a/crates/radicle/src/storage/refs/sigrefs/git.rs
+++ b/crates/radicle/src/storage/refs/sigrefs/git.rs
@@ -34,7 +34,7 @@ impl Committer {
///
/// The given [`PublicKey`] is always used for the email.
///
- /// In test code, [`Committer::stable`] is returned.
+ /// In test code, `Committer::stable` is returned.
///
/// [`GIT_COMMITTER_DATE`]: crate::profile::env::GIT_COMMITTER_DATE
pub fn from_env_or_now(public_key: &PublicKey) -> Self {
Exit code: 0
shell: 'export RUSTDOCFLAGS=''-D warnings'' cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps --all-features cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 94431d01-f52f-4986-af30-69f2617b4465 -v /opt/radcis/ci.rad.levitte.org/cci/state/94431d01-f52f-4986-af30-69f2617b4465/s:/94431d01-f52f-4986-af30-69f2617b4465/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/94431d01-f52f-4986-af30-69f2617b4465/w:/94431d01-f52f-4986-af30-69f2617b4465/w -w /94431d01-f52f-4986-af30-69f2617b4465/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /94431d01-f52f-4986-af30-69f2617b4465/s/script.sh
+ export 'RUSTDOCFLAGS=-D warnings'
+ RUSTDOCFLAGS='-D warnings'
+ cargo --version
info: syncing channel updates for '1.95-x86_64-unknown-linux-gnu'
info: latest update on 2026-04-16, rust version 1.95.0 (59807616e 2026-04-14)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.95.0 (f2d3ce0bd 2026-03-21)
+ rustc --version
rustc 1.95.0 (59807616e 2026-04-14)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny warnings
Updating crates.io index
Downloading crates ...
Downloaded cbc v0.1.2
Downloaded ahash v0.8.12
Downloaded gix-quote v0.6.2
Downloaded flate2 v1.1.9
Downloaded filetime v0.2.27
Downloaded ff v0.13.1
Downloaded log v0.4.29
Downloaded data-encoding-macro-internal v0.1.17
Downloaded anstream v0.6.21
Downloaded curve25519-dalek v4.1.3
Downloaded gix-prompt v0.13.1
Downloaded getrandom v0.2.17
Downloaded gix-odb v0.75.0
Downloaded iana-time-zone v0.1.65
Downloaded is_terminal_polyfill v1.70.2
Downloaded hmac v0.12.1
Downloaded gix-path v0.11.1
Downloaded gix-shallow v0.8.1
Downloaded lock_api v0.4.14
Downloaded litrs v1.0.0
Downloaded inout v0.1.4
Downloaded keccak v0.1.6
Downloaded ct-codecs v1.1.6
Downloaded memmap2 v0.9.10
Downloaded gix-validate v0.11.0
Downloaded multibase v0.9.2
Downloaded matchers v0.2.0
Downloaded opaque-debug v0.3.1
Downloaded num-rational v0.4.2
Downloaded gix-config-value v0.17.1
Downloaded normalize-line-endings v0.3.0
Downloaded noise-framework v0.4.0
Downloaded hash32 v0.3.1
Downloaded gix-trace v0.1.18
Downloaded num-traits v0.2.19
Downloaded pkcs8 v0.10.2
Downloaded num-cmp v0.1.0
Downloaded shell-words v1.1.1
Downloaded qcheck-macros v1.0.0
Downloaded proc-macro-error-attr2 v2.0.0
Downloaded pin-project-lite v0.2.17
Downloaded rand_chacha v0.9.0
Downloaded poly1305 v0.8.0
Downloaded scrypt v0.11.0
Downloaded pbkdf2 v0.12.2
Downloaded potential_utf v0.1.4
Downloaded pkg-config v0.3.32
Downloaded rustc_version v0.4.1
Downloaded same-file v1.0.6
Downloaded radicle-std-ext v0.2.0
Downloaded radicle-git-ext v0.12.0
Downloaded scopeguard v1.2.0
Downloaded snapbox-macros v0.3.10
Downloaded signature v2.2.0
Downloaded pkcs1 v0.7.5
Downloaded siphasher v0.3.11
Downloaded simd-adler32 v0.3.8
Downloaded signal-hook-mio v0.2.5
Downloaded shlex v1.3.0
Downloaded ssh-cipher v0.2.0
Downloaded spki v0.7.3
Downloaded sval_serde v2.17.0
Downloaded spin v0.9.8
Downloaded sqlite v0.37.0
Downloaded sval_buffer v2.17.0
Downloaded parking_lot v0.12.5
Downloaded thiserror v1.0.69
Downloaded toml_datetime v0.7.5+spec-1.1.0
Downloaded tree-sitter-json v0.24.8
Downloaded tree-sitter-language v0.1.7
Downloaded tracing-log v0.2.0
Downloaded tinystr v0.8.2
Downloaded rustversion v1.0.22
Downloaded version_check v0.9.5
Downloaded tree-sitter-html v0.23.2
Downloaded universal-hash v0.5.1
Downloaded tree-sitter-highlight v0.24.7
Downloaded wait-timeout v0.2.1
Downloaded signal-hook-registry v1.4.8
Downloaded utf8_iter v1.0.4
Downloaded radicle-surf v0.27.1
Downloaded value-bag-serde1 v1.12.0
Downloaded zerofrom v0.1.6
Downloaded value-bag-sval2 v1.12.0
Downloaded rand v0.8.5
Downloaded zerofrom-derive v0.1.6
Downloaded tracing-core v0.1.36
Downloaded unicode-ident v1.0.24
Downloaded zerovec-derive v0.11.2
Downloaded zmij v1.0.21
Downloaded unicode-display-width v0.3.0
Downloaded zeroize v1.8.2
Downloaded proptest v1.10.0
Downloaded xattr v1.6.1
Downloaded bstr v1.12.1
Downloaded url v2.5.8
Downloaded getrandom v0.4.2
Downloaded zerotrie v0.2.3
Downloaded unicode-normalization v0.1.25
Downloaded signals_receipts v0.2.5
Downloaded smallvec v1.15.1
Downloaded sysinfo v0.37.2
Downloaded zerovec v0.11.5
Downloaded tree-sitter-css v0.23.2
Downloaded winnow v0.7.15
Downloaded miniz_oxide v0.8.9
Downloaded socket2 v0.5.10
Downloaded zlib-rs v0.6.3
Downloaded icu_normalizer_data v2.1.1
Downloaded zerocopy v0.8.42
Downloaded uuid v1.22.0
Downloaded prodash v31.0.0
Downloaded tar v0.4.45
Downloaded serde v1.0.228
Downloaded yansi v1.0.1
Downloaded tree-sitter-bash v0.23.3
Downloaded tracing v0.1.44
Downloaded jsonschema v0.30.0
Downloaded icu_properties_data v2.1.2
Downloaded serde_json v1.0.149
Downloaded regex v1.12.3
Downloaded hashbrown v0.16.1
Downloaded idna v1.1.0
Downloaded tree-sitter-python v0.23.6
Downloaded libc v0.2.183
Downloaded fraction v0.15.3
Downloaded vcpkg v0.2.15
Downloaded libz-sys v1.1.25
Downloaded gimli v0.32.3
Downloaded git2 v0.20.4
Downloaded tree-sitter-md v0.3.2
Downloaded memchr v2.8.0
Downloaded sha1-checked v0.10.0
Downloaded regex-syntax v0.8.10
Downloaded typenum v1.19.0
Downloaded tree-sitter-rust v0.23.3
Downloaded sval v2.17.0
Downloaded sha3 v0.10.8
Downloaded rustix v1.1.4
Downloaded ssh-agent-lib v0.5.2
Downloaded tokio v1.50.0
Downloaded tree-sitter-ruby v0.23.1
Downloaded gix-transport v0.54.0
Downloaded tinyvec v1.11.0
Downloaded jiff-static v0.2.23
Downloaded itertools v0.14.0
Downloaded regex-automata v0.4.14
Downloaded inquire v0.9.4
Downloaded indexmap v2.13.0
Downloaded icu_collections v2.1.1
Downloaded fancy-regex v0.14.0
Downloaded unicode-width v0.2.2
Downloaded value-bag v1.12.0
Downloaded syn v2.0.117
Downloaded jiff v0.2.23
Downloaded object v0.37.3
Downloaded heapless v0.8.0
Downloaded icu_locale_core v2.1.1
Downloaded gix-diff v0.58.0
Downloaded tree-sitter-typescript v0.23.2
Downloaded tree-sitter-c v0.23.4
Downloaded tracing-subscriber v0.3.23
Downloaded thiserror-impl v1.0.69
Downloaded tempfile v3.27.0
Downloaded syn v1.0.109
Downloaded icu_normalizer v2.1.1
Downloaded yoke v0.8.1
Downloaded vsimd v0.8.0
Downloaded utf8parse v0.2.2
Downloaded tree-sitter v0.24.7
Downloaded indicatif v0.18.4
Downloaded icu_properties v2.1.2
Downloaded gix-ref v0.59.0
Downloaded gix-protocol v0.57.0
Downloaded portable-atomic v1.13.1
Downloaded gix-revwalk v0.27.0
Downloaded gix-refspec v0.37.0
Downloaded libgit2-sys v0.18.3+1.9.2
Downloaded gix-object v0.56.0
Downloaded getrandom v0.3.4
Downloaded unicode-segmentation v1.12.0
Downloaded toml_writer v1.0.7+spec-1.1.0
Downloaded thiserror v2.0.18
Downloaded sval_nested v2.17.0
Downloaded structured-logger v1.0.5
Downloaded quote v1.0.45
Downloaded unit-prefix v0.5.2
Downloaded unarray v0.1.4
Downloaded tree-sitter-go v0.23.4
Downloaded sval_json v2.17.0
Downloaded streaming-iterator v0.1.9
Downloaded ssh-key v0.6.7
Downloaded sqlite3-sys v0.18.0
Downloaded writeable v0.6.2
Downloaded typeid v1.0.3
Downloaded yoke-derive v0.8.1
Downloaded walkdir v2.5.0
Downloaded uuid-simd v0.8.0
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded tinyvec_macros v0.1.1
Downloaded toml v0.9.12+spec-1.1.0
Downloaded thread_local v1.1.9
Downloaded snapbox v0.4.17
Downloaded secrecy v0.10.3
Downloaded ppv-lite86 v0.2.21
Downloaded pem-rfc7468 v0.7.0
Downloaded phf v0.11.3
Downloaded gix-url v0.35.2
Downloaded test-log-macros v0.2.19
Downloaded serde_core v1.0.228
Downloaded sval_fmt v2.17.0
Downloaded sval_dynamic v2.17.0
Downloaded schemars v1.2.1
Downloaded ryu v1.0.23
Downloaded maybe-async v0.2.10
Downloaded icu_provider v2.1.1
Downloaded timeago v0.4.2
Downloaded thiserror-impl v2.0.18
Downloaded test-log v0.2.19
Downloaded systemd-journal-logger v2.2.2
Downloaded sval_ref v2.17.0
Downloaded subtle v2.6.1
Downloaded strsim v0.11.1
Downloaded stable_deref_trait v1.2.1
Downloaded socks5-client v0.4.2
Downloaded similar v2.7.0
Downloaded signal-hook v0.3.18
Downloaded serde_derive v1.0.228
Downloaded serde-untagged v0.1.9
Downloaded synstructure v0.13.2
Downloaded sharded-slab v0.1.7
Downloaded gix-object v0.55.0
Downloaded ssh-encoding v0.2.0
Downloaded siphasher v1.0.2
Downloaded proc-macro2 v1.0.106
Downloaded gix-revision v0.41.0
Downloaded gix-error v0.0.0
Downloaded serde_fmt v1.1.0
Downloaded rusty-fork v0.3.1
Downloaded serde_spanned v1.0.4
Downloaded sha1 v0.10.6
Downloaded rand v0.9.2
Downloaded p384 v0.13.1
Downloaded p256 v0.13.2
Downloaded signature v1.6.4
Downloaded sec1 v0.7.3
Downloaded referencing v0.30.0
Downloaded serde_derive_internals v0.29.1
Downloaded pretty_assertions v1.4.1
Downloaded human-panic v2.0.6
Downloaded gix-commitgraph v0.33.0
Downloaded fast-glob v0.3.3
Downloaded sha2 v0.10.9
Downloaded semver v1.0.27
Downloaded sem_safe v0.2.1
Downloaded schemars_derive v1.2.1
Downloaded rustc-demangle v0.1.27
Downloaded rand_chacha v0.3.1
Downloaded qcheck v1.0.0
Downloaded gix-traverse v0.52.0
Downloaded find-msvc-tools v0.1.9
Downloaded ref-cast v1.0.25
Downloaded rand_core v0.6.4
Downloaded p521 v0.13.3
Downloaded rfc6979 v0.4.0
Downloaded jobserver v0.1.34
Downloaded gix-revwalk v0.26.0
Downloaded gix-credentials v0.36.0
Downloaded salsa20 v0.10.2
Downloaded rsa v0.9.10
Downloaded rand_core v0.9.5
Downloaded libm v0.2.16
Downloaded percent-encoding v2.3.2
Downloaded chrono v0.4.44
Downloaded ref-cast-impl v1.0.25
Downloaded phf_shared v0.11.3
Downloaded pastey v0.2.1
Downloaded num-bigint v0.4.6
Downloaded gix-tempfile v21.0.1
Downloaded escargot v0.5.15
Downloaded once_cell v1.21.4
Downloaded num-integer v0.1.46
Downloaded match-lookup v0.1.2
Downloaded rand_xorshift v0.4.0
Downloaded primeorder v0.13.6
Downloaded gix-date v0.14.0
Downloaded gix-date v0.13.0
Downloaded gix-chunk v0.5.0
Downloaded nonempty v0.9.0
Downloaded quick-error v1.2.3
Downloaded proc-macro-error2 v2.0.1
Downloaded polyval v0.6.2
Downloaded num-bigint-dig v0.8.6
Downloaded num v0.4.3
Downloaded mio v1.1.1
Downloaded gix-utils v0.3.1
Downloaded git-ref-format-macro v0.6.0
Downloaded outref v0.5.2
Downloaded gix-glob v0.24.0
Downloaded form_urlencoded v1.2.2
Downloaded bloomy v1.2.0
Downloaded parking_lot_core v0.9.12
Downloaded nu-ansi-term v0.50.3
Downloaded lazy_static v1.5.0
Downloaded idna_adapter v1.2.1
Downloaded ed25519-dalek v2.2.0
Downloaded num-iter v0.1.45
Downloaded itoa v1.0.17
Downloaded gix-actor v0.38.0
Downloaded chacha20poly1305 v0.10.1
Downloaded num-complex v0.4.6
Downloaded crypto-bigint v0.5.5
Downloaded gix-sec v0.13.1
Downloaded fastrand v2.3.0
Downloaded humantime v2.3.0
Downloaded group v0.13.0
Downloaded gix-hash v0.22.1
Downloaded gix-error v0.1.0
Downloaded gix-commitgraph v0.32.0
Downloaded base64 v0.22.1
Downloaded generic-array v0.14.7
Downloaded litemap v0.8.1
Downloaded base64 v0.21.7
Downloaded anstyle-query v1.1.5
Downloaded gix-negotiate v0.27.0
Downloaded gix-chunk v0.6.0
Downloaded bytes v1.11.1
Downloaded heck v0.5.0
Downloaded emojis v0.6.4
Downloaded base64ct v1.8.3
Downloaded crossbeam-channel v0.5.15
Downloaded amplify_syn v2.0.1
Downloaded gix-packetline v0.21.1
Downloaded ed25519 v1.5.3
Downloaded colorchoice v1.0.5
Downloaded clap_derive v4.6.0
Downloaded cipher v0.4.4
Downloaded base32 v0.4.0
Downloaded anyhow v1.0.102
Downloaded anstyle v1.0.14
Downloaded amplify_num v0.5.3
Downloaded gix-lock v21.0.1
Downloaded gix-hashtable v0.12.0
Downloaded git-ref-format v0.6.0
Downloaded dunce v1.0.5
Downloaded clap v4.6.0
Downloaded ascii v1.1.0
Downloaded lexopt v0.3.2
Downloaded ec25519 v0.1.0
Downloaded derive_more v2.1.1
Downloaded arc-swap v1.8.2
Downloaded env_logger v0.11.9
Downloaded document-features v0.2.12
Downloaded crossterm v0.29.0
Downloaded bytesize v2.3.1
Downloaded byteorder v1.5.0
Downloaded block-padding v0.3.3
Downloaded git-ref-format-core v0.6.0
Downloaded ctr v0.9.2
Downloaded base16ct v0.2.0
Downloaded anstyle-parse v1.0.0
Downloaded anstyle-parse v0.2.7
Downloaded gix-pack v0.65.0
Downloaded gix-command v0.7.1
Downloaded equivalent v1.0.2
Downloaded env_filter v1.0.0
Downloaded ecdsa v0.16.9
Downloaded diff v0.1.13
Downloaded data-encoding v2.10.0
Downloaded clap_lex v1.1.0
Downloaded clap_builder v4.6.0
Downloaded cfg-if v1.0.4
Downloaded bytecount v0.6.9
Downloaded bcrypt-pbkdf v0.10.0
Downloaded base-x v0.2.11
Downloaded gix-actor v0.39.0
Downloaded fluent-uri v0.3.2
Downloaded cyphernet v0.5.3
Downloaded cc v1.2.57
Downloaded bit-vec v0.8.0
Downloaded backtrace v0.3.76
Downloaded either v1.15.0
Downloaded data-encoding-macro v0.1.19
Downloaded crypto-common v0.1.7
Downloaded crc32fast v1.5.0
Downloaded block-buffer v0.10.4
Downloaded faster-hex v0.10.0
Downloaded erased-serde v0.4.10
Downloaded curve25519-dalek-derive v0.1.1
Downloaded colored v2.2.0
Downloaded blowfish v0.9.1
Downloaded bit-set v0.8.0
Downloaded base256emoji v1.0.2
Downloaded autocfg v1.5.0
Downloaded aes v0.8.4
Downloaded gix-fs v0.19.1
Downloaded gix-features v0.46.1
Downloaded ghash v0.5.1
Downloaded fnv v1.0.7
Downloaded email_address v0.2.9
Downloaded elliptic-curve v0.13.8
Downloaded ed25519 v2.2.3
Downloaded dyn-clone v1.0.20
Downloaded digest v0.10.7
Downloaded der v0.7.10
Downloaded cyphergraphy v0.3.0
Downloaded cypheraddr v0.4.1
Downloaded convert_case v0.10.0
Downloaded const-str v0.4.3
Downloaded const-oid v0.9.6
Downloaded chacha20 v0.9.1
Downloaded adler2 v2.0.1
Downloaded crossbeam-utils v0.8.21
Downloaded cpufeatures v0.2.17
Downloaded bitflags v2.11.0
Downloaded amplify_derive v4.0.1
Downloaded console v0.16.3
Downloaded clap_complete v4.6.0
Downloaded borrow-or-share v0.2.4
Downloaded anstream v1.0.0
Downloaded displaydoc v0.2.5
Downloaded errno v0.3.14
Downloaded derive_more-impl v2.1.1
Downloaded amplify v4.9.0
Downloaded aho-corasick v1.1.4
Downloaded aes-gcm v0.10.3
Downloaded aead v0.5.2
Downloaded addr2line v0.25.1
Downloaded sqlite3-src v0.7.0
Downloaded linux-raw-sys v0.12.1
Compiling libc v0.2.183
Compiling proc-macro2 v1.0.106
Compiling unicode-ident v1.0.24
Compiling quote v1.0.45
Checking cfg-if v1.0.4
Checking zeroize v1.8.2
Compiling version_check v0.9.5
Compiling typenum v1.19.0
Compiling generic-array v0.14.7
Checking memchr v2.8.0
Compiling syn v2.0.117
Checking getrandom v0.2.17
Checking rand_core v0.6.4
Compiling find-msvc-tools v0.1.9
Compiling shlex v1.3.0
Checking subtle v2.6.1
Checking crypto-common v0.1.7
Compiling jobserver v0.1.34
Checking regex-syntax v0.8.10
Checking aho-corasick v1.1.4
Compiling cc v1.2.57
Checking smallvec v1.15.1
Checking const-oid v0.9.6
Compiling serde_core v1.0.228
Checking regex-automata v0.4.14
Checking block-buffer v0.10.4
Checking digest v0.10.7
Checking cpufeatures v0.2.17
Compiling thiserror v2.0.18
Checking stable_deref_trait v1.2.1
Checking fastrand v2.3.0
Compiling parking_lot_core v0.9.12
Checking scopeguard v1.2.0
Checking lock_api v0.4.14
Checking bitflags v2.11.0
Checking tinyvec_macros v0.1.1
Checking tinyvec v1.11.0
Checking parking_lot v0.12.5
Compiling crc32fast v1.5.0
Checking bstr v1.12.1
Checking gix-trace v0.1.18
Checking unicode-normalization v0.1.25
Checking itoa v1.0.17
Checking byteorder v1.5.0
Compiling typeid v1.0.3
Checking gix-validate v0.11.0
Checking gix-utils v0.3.1
Compiling thiserror-impl v2.0.18
Compiling erased-serde v0.4.10
Checking hashbrown v0.16.1
Compiling serde v1.0.228
Compiling serde_derive v1.0.228
Checking serde_fmt v1.1.0
Checking same-file v1.0.6
Checking value-bag-serde1 v1.12.0
Checking walkdir v2.5.0
Checking prodash v31.0.0
Compiling synstructure v0.13.2
Checking zlib-rs v0.6.3
Checking gix-path v0.11.1
Checking value-bag v1.12.0
Compiling heapless v0.8.0
Checking log v0.4.29
Compiling zerofrom-derive v0.1.6
Checking hash32 v0.3.1
Checking gix-features v0.46.1
Compiling yoke-derive v0.8.1
Checking faster-hex v0.10.0
Compiling pkg-config v0.3.32
Checking zerofrom v0.1.6
Compiling rustix v1.1.4
Compiling zerovec-derive v0.11.2
Checking sha1 v0.10.6
Checking yoke v0.8.1
Checking linux-raw-sys v0.12.1
Compiling libm v0.2.16
Compiling autocfg v1.5.0
Checking sha1-checked v0.10.0
Compiling num-traits v0.2.19
Checking zerovec v0.11.5
Compiling displaydoc v0.2.5
Compiling getrandom v0.4.2
Checking gix-hash v0.22.1
Checking block-padding v0.3.3
Compiling zerocopy v0.8.42
Checking inout v0.1.4
Checking sha2 v0.10.9
Checking cipher v0.4.4
Checking tinystr v0.8.2
Checking percent-encoding v2.3.2
Checking litemap v0.8.1
Checking once_cell v1.21.4
Checking writeable v0.6.2
Checking icu_locale_core v2.1.1
Checking zerotrie v0.2.3
Checking potential_utf v0.1.4
Compiling icu_properties_data v2.1.2
Compiling zmij v1.0.21
Compiling icu_normalizer_data v2.1.1
Checking icu_provider v2.1.1
Checking icu_collections v2.1.1
Checking der v0.7.10
Compiling serde_json v1.0.149
Checking equivalent v1.0.2
Checking indexmap v2.13.0
Compiling syn v1.0.109
Compiling ref-cast v1.0.25
Compiling thiserror v1.0.69
Compiling vcpkg v0.2.15
Checking icu_properties v2.1.2
Compiling libz-sys v1.1.25
Checking ppv-lite86 v0.2.21
Checking icu_normalizer v2.1.1
Checking tempfile v3.27.0
Compiling ref-cast-impl v1.0.25
Compiling thiserror-impl v1.0.69
Checking spin v0.9.8
Checking idna_adapter v1.2.1
Checking lazy_static v1.5.0
Checking num-integer v0.1.46
Checking hmac v0.12.1
Checking universal-hash v0.5.1
Compiling tree-sitter-language v0.1.7
Checking opaque-debug v0.3.1
Checking dyn-clone v1.0.20
Checking utf8_iter v1.0.4
Checking spki v0.7.3
Checking idna v1.1.0
Compiling libgit2-sys v0.18.3+1.9.2
Checking signature v2.2.0
Checking ff v0.13.1
Checking base16ct v0.2.0
Checking group v0.13.0
Checking sec1 v0.7.3
Checking rand_chacha v0.3.1
Checking form_urlencoded v1.2.2
Compiling serde_derive_internals v0.29.1
Checking crypto-bigint v0.5.5
Compiling schemars_derive v1.2.1
Checking elliptic-curve v0.13.8
Compiling amplify_syn v2.0.1
Checking rand v0.8.5
Checking url v2.5.8
Checking num-iter v0.1.45
Checking aead v0.5.2
Compiling semver v1.0.27
Checking signature v1.6.4
Checking schemars v1.2.1
Checking ed25519 v1.5.3
Compiling rustc_version v0.4.1
Compiling amplify_derive v4.0.1
Checking poly1305 v0.8.0
Checking rfc6979 v0.4.0
Checking chacha20 v0.9.1
Checking ct-codecs v1.1.6
Checking amplify_num v0.5.3
Checking ascii v1.1.0
Checking ec25519 v0.1.0
Checking ecdsa v0.16.9
Compiling curve25519-dalek v4.1.3
Checking git-ref-format-core v0.6.0
Checking primeorder v0.13.6
Checking amplify v4.9.0
Checking polyval v0.6.2
Compiling num-bigint-dig v0.8.6
Checking base64ct v1.8.3
Checking ghash v0.5.1
Checking cyphergraphy v0.3.0
Checking pkcs8 v0.10.2
Checking pbkdf2 v0.12.2
Checking pem-rfc7468 v0.7.0
Checking aes v0.8.4
Checking ctr v0.9.2
Compiling sqlite3-src v0.7.0
Compiling curve25519-dalek-derive v0.1.1
Checking keccak v0.1.6
Checking sha3 v0.10.8
Checking aes-gcm v0.10.3
Checking ssh-encoding v0.2.0
Checking pkcs1 v0.7.5
Checking ed25519 v2.2.3
Checking cbc v0.1.2
Checking blowfish v0.9.1
Checking base32 v0.4.0
Compiling crossbeam-utils v0.8.21
Compiling data-encoding v2.10.0
Checking rsa v0.9.10
Checking cypheraddr v0.4.1
Compiling data-encoding-macro-internal v0.1.17
Checking bcrypt-pbkdf v0.10.0
Checking ssh-cipher v0.2.0
Checking ed25519-dalek v2.2.0
Checking p256 v0.13.2
Checking p384 v0.13.1
Checking p521 v0.13.3
Checking chacha20poly1305 v0.10.1
Checking qcheck v1.0.0
Compiling match-lookup v0.1.2
Checking const-str v0.4.3
Checking jiff v0.2.23
Checking data-encoding-macro v0.1.19
Checking base256emoji v1.0.2
Checking ssh-key v0.6.7
Checking noise-framework v0.4.0
Checking socks5-client v0.4.2
Checking secrecy v0.10.3
Checking base-x v0.2.11
Checking multibase v0.9.2
Checking ssh-agent-lib v0.5.2
Checking crossbeam-channel v0.5.15
Checking cyphernet v0.5.3
Checking anstyle-query v1.1.5
Checking winnow v0.7.15
Checking errno v0.3.14
Checking utf8parse v0.2.2
Checking gix-hashtable v0.12.0
Checking nonempty v0.9.0
Checking siphasher v1.0.2
Checking radicle-localtime v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-localtime)
Checking radicle-git-metadata v0.2.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-git-metadata)
Checking gix-error v0.1.0
Checking radicle-dag v0.10.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-dag)
Checking memmap2 v0.9.10
Checking is_terminal_polyfill v1.70.2
Checking anstyle v1.0.14
Checking colorchoice v1.0.5
Checking radicle-git-ref-format v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-git-ref-format)
Compiling unicode-segmentation v1.12.0
Compiling signal-hook v0.3.18
Compiling radicle v0.24.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle)
Checking base64 v0.21.7
Compiling convert_case v0.10.0
Checking signal-hook-registry v1.4.8
Checking serde-untagged v0.1.9
Checking gix-error v0.0.0
Checking bytesize v2.3.1
Checking fast-glob v0.3.3
Checking dunce v1.0.5
Compiling derive_more-impl v2.1.1
Checking gix-date v0.14.0
Checking mio v1.1.1
Checking regex v1.12.3
Checking sem_safe v0.2.1
Compiling portable-atomic v1.13.1
Checking unicode-width v0.2.2
Compiling litrs v1.0.0
Checking signals_receipts v0.2.5
Checking signal-hook-mio v0.2.5
Checking derive_more v2.1.1
Checking anstyle-parse v0.2.7
Compiling document-features v0.2.12
Checking crossterm v0.29.0
Checking anstream v0.6.21
Checking console v0.16.3
Checking gix-actor v0.39.0
Checking gix-date v0.13.0
Checking gix-fs v0.19.1
Checking unit-prefix v0.5.2
Checking indicatif v0.18.4
Checking gix-tempfile v21.0.1
Checking gix-actor v0.38.0
Checking gix-object v0.56.0
Checking inquire v0.9.4
Checking unicode-display-width v0.3.0
Checking radicle-signals v0.11.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-signals)
Checking gix-chunk v0.6.0
Checking gix-quote v0.6.2
Checking gix-commitgraph v0.33.0
Checking gix-object v0.55.0
Checking gix-chunk v0.5.0
Checking shell-words v1.1.1
Checking iana-time-zone v0.1.65
Checking either v1.15.0
Checking chrono v0.4.44
Checking gix-command v0.7.1
Checking gix-commitgraph v0.32.0
Checking gix-revwalk v0.27.0
Checking colored v2.2.0
Compiling object v0.37.3
Compiling rustversion v1.0.22
Checking gix-revwalk v0.26.0
Checking gix-lock v21.0.1
Checking gix-url v0.35.2
Checking gix-config-value v0.17.1
Checking gix-sec v0.13.1
Checking adler2 v2.0.1
Checking gimli v0.32.3
Checking miniz_oxide v0.8.9
Checking gix-prompt v0.13.1
Checking gix-traverse v0.52.0
Checking addr2line v0.25.1
Checking gix-revision v0.41.0
Checking gix-diff v0.58.0
Checking gix-packetline v0.21.1
Checking gix-glob v0.24.0
Compiling tree-sitter v0.24.7
Checking rustc-demangle v0.1.27
Compiling anyhow v1.0.102
Checking backtrace v0.3.76
Checking gix-refspec v0.37.0
Checking gix-transport v0.54.0
Checking gix-pack v0.65.0
Checking arc-swap v1.8.2
Checking gix-credentials v0.36.0
Checking gix-shallow v0.8.1
Checking gix-ref v0.59.0
Checking gix-negotiate v0.27.0
Compiling maybe-async v0.2.10
Compiling proc-macro-error-attr2 v2.0.0
Compiling simd-adler32 v0.3.8
Compiling getrandom v0.3.4
Checking gix-protocol v0.57.0
Compiling proc-macro-error2 v2.0.1
Checking gix-odb v0.75.0
Compiling xattr v1.6.1
Compiling filetime v0.2.27
Checking anstyle-parse v1.0.0
Checking uuid v1.22.0
Checking bytes v1.11.1
Checking anstream v1.0.0
Compiling tar v0.4.45
Compiling flate2 v1.1.9
Compiling git-ref-format-macro v0.6.0
Checking snapbox-macros v0.3.10
Checking salsa20 v0.10.2
Checking clap_lex v1.1.0
Checking strsim v0.11.1
Checking siphasher v0.3.11
Checking normalize-line-endings v0.3.0
Compiling heck v0.5.0
Checking similar v2.7.0
Checking streaming-iterator v0.1.9
Checking snapbox v0.4.17
Checking sqlite3-sys v0.18.0
Compiling clap_derive v4.6.0
Checking sqlite v0.37.0
Checking bloomy v1.2.0
Checking clap_builder v4.6.0
Checking radicle-crypto v0.17.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-crypto)
Compiling radicle-surf v0.27.1
Checking scrypt v0.11.0
Checking git-ref-format v0.6.0
Checking systemd-journal-logger v2.2.2
Checking serde_spanned v1.0.4
Checking toml_datetime v0.7.5+spec-1.1.0
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-rust v0.23.3
Compiling tree-sitter-css v0.23.2
Compiling tree-sitter-c v0.23.4
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-python v0.23.6
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-ruby v0.23.1
Checking pin-project-lite v0.2.17
Checking toml_writer v1.0.7+spec-1.1.0
Checking radicle-std-ext v0.2.0
Checking toml v0.9.12+spec-1.1.0
Checking tokio v1.50.0
Checking clap v4.6.0
Checking sysinfo v0.37.2
Checking diff v0.1.13
Compiling radicle-cli v0.21.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cli)
Checking yansi v1.0.1
Compiling radicle-node v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-node)
Checking pretty_assertions v1.4.1
Checking human-panic v2.0.6
Checking clap_complete v4.6.0
Checking structured-logger v1.0.5
Checking radicle-systemd v0.13.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-systemd)
Checking tree-sitter-highlight v0.24.7
Checking itertools v0.14.0
Compiling qcheck-macros v1.0.0
Checking socket2 v0.5.10
Checking lexopt v0.3.2
Compiling escargot v0.5.15
Checking timeago v0.4.2
Checking humantime v2.3.0
Checking bit-vec v0.8.0
Checking bit-set v0.8.0
Checking rand_core v0.9.5
Checking num-bigint v0.4.6
Compiling ahash v0.8.12
Checking num-complex v0.4.6
Checking env_filter v1.0.0
Checking borrow-or-share v0.2.4
Checking fluent-uri v0.3.2
Checking env_logger v0.11.9
Checking num-rational v0.4.2
Checking phf_shared v0.11.3
Compiling test-log-macros v0.2.19
Checking wait-timeout v0.2.1
Checking fnv v1.0.7
Checking outref v0.5.2
Checking num v0.4.3
Checking quick-error v1.2.3
Checking vsimd v0.8.0
Compiling radicle-remote-helper v0.17.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-remote-helper)
Checking rusty-fork v0.3.1
Checking test-log v0.2.19
Checking fraction v0.15.3
Checking uuid-simd v0.8.0
Checking phf v0.11.3
Checking referencing v0.30.0
Checking rand_xorshift v0.4.0
Checking rand_chacha v0.9.0
Checking rand v0.9.2
Checking fancy-regex v0.14.0
Checking email_address v0.2.9
Checking num-cmp v0.1.0
Checking bytecount v0.6.9
Checking unarray v0.1.4
Checking base64 v0.22.1
Checking emojis v0.6.4
Checking proptest v1.10.0
Checking jsonschema v0.30.0
Compiling pastey v0.2.1
Checking radicle-windows v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-windows)
Checking git2 v0.20.4
Checking radicle-oid v0.2.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-oid)
Checking radicle-term v0.18.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-term)
Checking radicle-git-ext v0.12.0
Checking radicle-cob v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cob)
Checking radicle-core v0.3.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-core)
Checking radicle-log v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-log)
Checking radicle-fetch v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-fetch)
Checking radicle-cli-test v0.13.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cli-test)
Checking radicle-schemars v0.8.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-schemars)
Checking radicle-protocol v0.8.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-protocol)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 48.04s
+ cargo build --all-targets --workspace
Compiling libc v0.2.183
Compiling cfg-if v1.0.4
Compiling zeroize v1.8.2
Compiling memchr v2.8.0
Compiling typenum v1.19.0
Compiling shlex v1.3.0
Compiling regex-syntax v0.8.10
Compiling generic-array v0.14.7
Compiling subtle v2.6.1
Compiling getrandom v0.2.17
Compiling jobserver v0.1.34
Compiling rand_core v0.6.4
Compiling cc v1.2.57
Compiling crypto-common v0.1.7
Compiling aho-corasick v1.1.4
Compiling smallvec v1.15.1
Compiling const-oid v0.9.6
Compiling serde_core v1.0.228
Compiling regex-automata v0.4.14
Compiling block-buffer v0.10.4
Compiling digest v0.10.7
Compiling cpufeatures v0.2.17
Compiling stable_deref_trait v1.2.1
Compiling thiserror v2.0.18
Compiling fastrand v2.3.0
Compiling scopeguard v1.2.0
Compiling lock_api v0.4.14
Compiling parking_lot_core v0.9.12
Compiling bitflags v2.11.0
Compiling parking_lot v0.12.5
Compiling tinyvec_macros v0.1.1
Compiling gix-trace v0.1.18
Compiling tinyvec v1.11.0
Compiling itoa v1.0.17
Compiling byteorder v1.5.0
Compiling unicode-normalization v0.1.25
Compiling crc32fast v1.5.0
Compiling typeid v1.0.3
Compiling hashbrown v0.16.1
Compiling erased-serde v0.4.10
Compiling gix-utils v0.3.1
Compiling serde v1.0.228
Compiling serde_fmt v1.1.0
Compiling same-file v1.0.6
Compiling bstr v1.12.1
Compiling walkdir v2.5.0
Compiling value-bag-serde1 v1.12.0
Compiling prodash v31.0.0
Compiling zlib-rs v0.6.3
Compiling gix-validate v0.11.0
Compiling gix-path v0.11.1
Compiling value-bag v1.12.0
Compiling log v0.4.29
Compiling hash32 v0.3.1
Compiling heapless v0.8.0
Compiling zerofrom v0.1.6
Compiling yoke v0.8.1
Compiling sha1 v0.10.6
Compiling faster-hex v0.10.0
Compiling linux-raw-sys v0.12.1
Compiling zerovec v0.11.5
Compiling sha1-checked v0.10.0
Compiling libm v0.2.16
Compiling block-padding v0.3.3
Compiling inout v0.1.4
Compiling rustix v1.1.4
Compiling getrandom v0.4.2
Compiling sha2 v0.10.9
Compiling num-traits v0.2.19
Compiling cipher v0.4.4
Compiling zerocopy v0.8.42
Compiling tinystr v0.8.2
Compiling gix-features v0.46.1
Compiling gix-hash v0.22.1
Compiling once_cell v1.21.4
Compiling percent-encoding v2.3.2
Compiling litemap v0.8.1
Compiling writeable v0.6.2
Compiling zerotrie v0.2.3
Compiling icu_locale_core v2.1.1
Compiling potential_utf v0.1.4
Compiling icu_collections v2.1.1
Compiling icu_provider v2.1.1
Compiling der v0.7.10
Compiling equivalent v1.0.2
Compiling icu_normalizer_data v2.1.1
Compiling indexmap v2.13.0
Compiling icu_properties_data v2.1.2
Compiling zmij v1.0.21
Compiling libz-sys v1.1.25
Compiling serde_json v1.0.149
Compiling icu_properties v2.1.2
Compiling icu_normalizer v2.1.1
Compiling ppv-lite86 v0.2.21
Compiling tempfile v3.27.0
Compiling spin v0.9.8
Compiling lazy_static v1.5.0
Compiling ref-cast v1.0.25
Compiling idna_adapter v1.2.1
Compiling num-integer v0.1.46
Compiling hmac v0.12.1
Compiling universal-hash v0.5.1
Compiling dyn-clone v1.0.20
Compiling opaque-debug v0.3.1
Compiling utf8_iter v1.0.4
Compiling thiserror v1.0.69
Compiling idna v1.1.0
Compiling spki v0.7.3
Compiling libgit2-sys v0.18.3+1.9.2
Compiling signature v2.2.0
Compiling ff v0.13.1
Compiling base16ct v0.2.0
Compiling group v0.13.0
Compiling sec1 v0.7.3
Compiling rand_chacha v0.3.1
Compiling form_urlencoded v1.2.2
Compiling crypto-bigint v0.5.5
Compiling url v2.5.8
Compiling rand v0.8.5
Compiling num-iter v0.1.45
Compiling aead v0.5.2
Compiling signature v1.6.4
Compiling ed25519 v1.5.3
Compiling schemars v1.2.1
Compiling elliptic-curve v0.13.8
Compiling poly1305 v0.8.0
Compiling rfc6979 v0.4.0
Compiling chacha20 v0.9.1
Compiling ascii v1.1.0
Compiling ct-codecs v1.1.6
Compiling amplify_num v0.5.3
Compiling ec25519 v0.1.0
Compiling ecdsa v0.16.9
Compiling primeorder v0.13.6
Compiling git-ref-format-core v0.6.0
Compiling polyval v0.6.2
Compiling amplify v4.9.0
Compiling base64ct v1.8.3
Compiling pem-rfc7468 v0.7.0
Compiling cyphergraphy v0.3.0
Compiling ghash v0.5.1
Compiling pkcs8 v0.10.2
Compiling pbkdf2 v0.12.2
Compiling ctr v0.9.2
Compiling aes v0.8.4
Compiling sqlite3-src v0.7.0
Compiling keccak v0.1.6
Compiling sha3 v0.10.8
Compiling aes-gcm v0.10.3
Compiling curve25519-dalek v4.1.3
Compiling pkcs1 v0.7.5
Compiling ssh-encoding v0.2.0
Compiling num-bigint-dig v0.8.6
Compiling ed25519 v2.2.3
Compiling blowfish v0.9.1
Compiling cbc v0.1.2
Compiling base32 v0.4.0
Compiling cypheraddr v0.4.1
Compiling rsa v0.9.10
Compiling ssh-cipher v0.2.0
Compiling bcrypt-pbkdf v0.10.0
Compiling ed25519-dalek v2.2.0
Compiling p256 v0.13.2
Compiling p521 v0.13.3
Compiling p384 v0.13.1
Compiling chacha20poly1305 v0.10.1
Compiling qcheck v1.0.0
Compiling jiff v0.2.23
Compiling data-encoding v2.10.0
Compiling const-str v0.4.3
Compiling base256emoji v1.0.2
Compiling data-encoding-macro v0.1.19
Compiling noise-framework v0.4.0
Compiling ssh-key v0.6.7
Compiling socks5-client v0.4.2
Compiling crossbeam-utils v0.8.21
Compiling secrecy v0.10.3
Compiling base-x v0.2.11
Compiling multibase v0.9.2
Compiling crossbeam-channel v0.5.15
Compiling ssh-agent-lib v0.5.2
Compiling cyphernet v0.5.3
Compiling anstyle-query v1.1.5
Compiling winnow v0.7.15
Compiling errno v0.3.14
Compiling utf8parse v0.2.2
Compiling gix-hashtable v0.12.0
Compiling nonempty v0.9.0
Compiling siphasher v1.0.2
Compiling radicle-localtime v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-localtime)
Compiling gix-error v0.1.0
Compiling radicle-dag v0.10.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-dag)
Compiling radicle-git-metadata v0.2.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-git-metadata)
Compiling memmap2 v0.9.10
Compiling anstyle v1.0.14
Compiling unicode-segmentation v1.12.0
Compiling colorchoice v1.0.5
Compiling is_terminal_polyfill v1.70.2
Compiling radicle-git-ref-format v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-git-ref-format)
Compiling base64 v0.21.7
Compiling radicle v0.24.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle)
Compiling convert_case v0.10.0
Compiling signal-hook-registry v1.4.8
Compiling tree-sitter-language v0.1.7
Compiling gix-error v0.0.0
Compiling serde-untagged v0.1.9
Compiling bytesize v2.3.1
Compiling dunce v1.0.5
Compiling fast-glob v0.3.3
Compiling signal-hook v0.3.18
Compiling derive_more-impl v2.1.1
Compiling gix-date v0.14.0
Compiling mio v1.1.1
Compiling regex v1.12.3
Compiling sem_safe v0.2.1
Compiling unicode-width v0.2.2
Compiling signals_receipts v0.2.5
Compiling signal-hook-mio v0.2.5
Compiling derive_more v2.1.1
Compiling anstyle-parse v0.2.7
Compiling adler2 v2.0.1
Compiling anstream v0.6.21
Compiling crossterm v0.29.0
Compiling console v0.16.3
Compiling portable-atomic v1.13.1
Compiling gix-actor v0.39.0
Compiling gix-date v0.13.0
Compiling gix-fs v0.19.1
Compiling unit-prefix v0.5.2
Compiling indicatif v0.18.4
Compiling gix-tempfile v21.0.1
Compiling gix-actor v0.38.0
Compiling gix-object v0.56.0
Compiling inquire v0.9.4
Compiling radicle-signals v0.11.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-signals)
Compiling unicode-display-width v0.3.0
Compiling gix-chunk v0.6.0
Compiling gix-quote v0.6.2
Compiling gix-commitgraph v0.33.0
Compiling gix-object v0.55.0
Compiling gix-chunk v0.5.0
Compiling shell-words v1.1.1
Compiling iana-time-zone v0.1.65
Compiling either v1.15.0
Compiling chrono v0.4.44
Compiling gix-command v0.7.1
Compiling gix-commitgraph v0.32.0
Compiling gix-revwalk v0.27.0
Compiling colored v2.2.0
Compiling gix-revwalk v0.26.0
Compiling gix-lock v21.0.1
Compiling gix-url v0.35.2
Compiling gix-config-value v0.17.1
Compiling gix-sec v0.13.1
Compiling gimli v0.32.3
Compiling gix-prompt v0.13.1
Compiling gix-traverse v0.52.0
Compiling object v0.37.3
Compiling sqlite3-sys v0.18.0
Compiling sqlite v0.37.0
Compiling radicle-crypto v0.17.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-crypto)
Compiling addr2line v0.25.1
Compiling gix-revision v0.41.0
Compiling gix-diff v0.58.0
Compiling miniz_oxide v0.8.9
Compiling gix-glob v0.24.0
Compiling gix-packetline v0.21.1
Compiling tree-sitter v0.24.7
Compiling rustc-demangle v0.1.27
Compiling backtrace v0.3.76
Compiling gix-transport v0.54.0
Compiling gix-refspec v0.37.0
Compiling gix-pack v0.65.0
Compiling arc-swap v1.8.2
Compiling gix-credentials v0.36.0
Compiling gix-ref v0.59.0
Compiling gix-shallow v0.8.1
Compiling gix-negotiate v0.27.0
Compiling gix-protocol v0.57.0
Compiling gix-odb v0.75.0
Compiling xattr v1.6.1
Compiling anstyle-parse v1.0.0
Compiling uuid v1.22.0
Compiling filetime v0.2.27
Compiling bytes v1.11.1
Compiling tar v0.4.45
Compiling git-ref-format-macro v0.6.0
Compiling anstream v1.0.0
Compiling anyhow v1.0.102
Compiling flate2 v1.1.9
Compiling getrandom v0.3.4
Compiling snapbox-macros v0.3.10
Compiling salsa20 v0.10.2
Compiling streaming-iterator v0.1.9
Compiling clap_lex v1.1.0
Compiling similar v2.7.0
Compiling normalize-line-endings v0.3.0
Compiling strsim v0.11.1
Compiling siphasher v0.3.11
Compiling clap_builder v4.6.0
Compiling snapbox v0.4.17
Compiling bloomy v1.2.0
Compiling scrypt v0.11.0
Compiling radicle-surf v0.27.1
Compiling git-ref-format v0.6.0
Compiling systemd-journal-logger v2.2.2
Compiling toml_datetime v0.7.5+spec-1.1.0
Compiling serde_spanned v1.0.4
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-rust v0.23.3
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-css v0.23.2
Compiling tree-sitter-python v0.23.6
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-c v0.23.4
Compiling radicle-std-ext v0.2.0
Compiling pin-project-lite v0.2.17
Compiling toml_writer v1.0.7+spec-1.1.0
Compiling tokio v1.50.0
Compiling toml v0.9.12+spec-1.1.0
Compiling clap v4.6.0
Compiling sysinfo v0.37.2
Compiling radicle-cli v0.21.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cli)
Compiling yansi v1.0.1
Compiling diff v0.1.13
Compiling radicle-node v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-node)
Compiling pretty_assertions v1.4.1
Compiling human-panic v2.0.6
Compiling clap_complete v4.6.0
Compiling git2 v0.20.4
Compiling structured-logger v1.0.5
Compiling radicle-systemd v0.13.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-systemd)
Compiling tree-sitter-highlight v0.24.7
Compiling itertools v0.14.0
Compiling socket2 v0.5.10
Compiling humantime v2.3.0
Compiling lexopt v0.3.2
Compiling timeago v0.4.2
Compiling bit-vec v0.8.0
Compiling escargot v0.5.15
Compiling bit-set v0.8.0
Compiling rand_core v0.9.5
Compiling num-bigint v0.4.6
Compiling num-complex v0.4.6
Compiling radicle-oid v0.2.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-oid)
Compiling radicle-cob v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cob)
Compiling radicle-core v0.3.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-core)
Compiling radicle-term v0.18.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-term)
Compiling radicle-git-ext v0.12.0
Compiling radicle-log v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-log)
Compiling num-rational v0.4.2
Compiling env_filter v1.0.0
Compiling borrow-or-share v0.2.4
Compiling env_logger v0.11.9
Compiling fluent-uri v0.3.2
Compiling num v0.4.3
Compiling ahash v0.8.12
Compiling phf_shared v0.11.3
Compiling wait-timeout v0.2.1
Compiling radicle-remote-helper v0.17.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-remote-helper)
Compiling outref v0.5.2
Compiling vsimd v0.8.0
Compiling fnv v1.0.7
Compiling quick-error v1.2.3
Compiling rusty-fork v0.3.1
Compiling referencing v0.30.0
Compiling uuid-simd v0.8.0
Compiling test-log v0.2.19
Compiling phf v0.11.3
Compiling fraction v0.15.3
Compiling rand_xorshift v0.4.0
Compiling rand v0.9.2
Compiling rand_chacha v0.9.0
Compiling fancy-regex v0.14.0
Compiling email_address v0.2.9
Compiling unarray v0.1.4
Compiling num-cmp v0.1.0
Compiling bytecount v0.6.9
Compiling base64 v0.22.1
Compiling proptest v1.10.0
Compiling jsonschema v0.30.0
Compiling emojis v0.6.4
Compiling radicle-fetch v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-fetch)
Compiling radicle-protocol v0.8.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-protocol)
Compiling radicle-cli-test v0.13.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cli-test)
Compiling radicle-schemars v0.8.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-schemars)
Compiling radicle-windows v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-windows)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 03s
+ cargo doc --workspace --no-deps --all-features
Checking regex-automata v0.4.14
Compiling num-traits v0.2.19
Checking once_cell v1.21.4
Compiling syn v1.0.109
Checking tempfile v3.27.0
Checking idna v1.1.0
Checking url v2.5.8
Checking git2 v0.20.4
Checking num-integer v0.1.46
Checking num-iter v0.1.45
Checking num-bigint-dig v0.8.6
Checking rsa v0.9.10
Checking bstr v1.12.1
Compiling amplify_syn v2.0.1
Checking gix-validate v0.11.0
Checking gix-path v0.11.1
Checking git-ref-format-core v0.6.0
Checking gix-features v0.46.1
Compiling amplify_derive v4.0.1
Checking ssh-key v0.6.7
Checking gix-hash v0.22.1
Checking radicle-git-ref-format v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-git-ref-format)
Checking gix-error v0.1.0
Checking gix-hashtable v0.12.0
Checking radicle-oid v0.2.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-oid)
Checking rusty-fork v0.3.1
Checking gix-error v0.0.0
Checking proptest v1.10.0
Checking radicle-localtime v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-localtime)
Checking radicle-git-metadata v0.2.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-git-metadata)
Checking ssh-agent-lib v0.5.2
Checking radicle-dag v0.10.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-dag)
Checking gix-date v0.14.0
Checking gix-date v0.13.0
Checking gix-actor v0.39.0
Checking gix-fs v0.19.1
Checking gix-object v0.56.0
Checking gix-tempfile v21.0.1
Checking gix-actor v0.38.0
Checking amplify v4.9.0
Checking gix-chunk v0.6.0
Checking gix-quote v0.6.2
Checking regex v1.12.3
Checking cyphergraphy v0.3.0
Checking cypheraddr v0.4.1
Checking noise-framework v0.4.0
Checking gix-commitgraph v0.33.0
Checking inquire v0.9.4
Checking gix-object v0.55.0
Checking socks5-client v0.4.2
Checking radicle-signals v0.11.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-signals)
Checking cyphernet v0.5.3
Checking radicle-crypto v0.17.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-crypto)
Checking gix-chunk v0.5.0
Checking gix-command v0.7.1
Checking gix-commitgraph v0.32.0
Checking gix-revwalk v0.27.0
Checking radicle-cob v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cob)
Checking radicle-core v0.3.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-core)
Checking chrono v0.4.44
Checking gix-revwalk v0.26.0
Checking radicle-term v0.18.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-term)
Checking gix-lock v21.0.1
Checking gix-config-value v0.17.1
Checking radicle v0.24.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle)
Checking gix-url v0.35.2
Checking gix-prompt v0.13.1
Checking gix-traverse v0.52.0
Checking gix-diff v0.58.0
Checking gix-revision v0.41.0
Checking gix-glob v0.24.0
Checking gix-packetline v0.21.1
Checking tree-sitter v0.24.7
Checking gix-transport v0.54.0
Checking gix-refspec v0.37.0
Checking gix-pack v0.65.0
Checking radicle-log v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-log)
Checking gix-credentials v0.36.0
Checking git-ref-format v0.6.0
Checking gix-ref v0.59.0
Checking gix-shallow v0.8.1
Checking gix-negotiate v0.27.0
Checking radicle-git-ext v0.12.0
Checking gix-protocol v0.57.0
Checking uuid v1.22.0
Checking gix-odb v0.75.0
Compiling radicle-cli v0.21.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cli)
Checking human-panic v2.0.6
Checking radicle-surf v0.27.1
Checking tree-sitter-toml-ng v0.6.0
Checking tree-sitter-highlight v0.24.7
Checking radicle-systemd v0.13.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-systemd)
Documenting radicle-systemd v0.13.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-systemd)
Documenting radicle-log v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-log)
Documenting radicle v0.24.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle)
Documenting radicle-core v0.3.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-core)
Documenting radicle-cob v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cob)
Documenting radicle-term v0.18.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-term)
Documenting radicle-crypto v0.17.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-crypto)
Documenting radicle-signals v0.11.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-signals)
Documenting radicle-oid v0.2.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-oid)
Documenting radicle-git-ref-format v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-git-ref-format)
Documenting radicle-localtime v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-localtime)
Documenting radicle-git-metadata v0.2.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-git-metadata)
Documenting radicle-dag v0.10.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-dag)
Documenting radicle-windows v0.1.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-windows)
Checking radicle-fetch v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-fetch)
Documenting radicle-cli v0.21.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cli)
Documenting radicle-schemars v0.8.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-schemars)
Checking radicle-protocol v0.8.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-protocol)
Documenting radicle-protocol v0.8.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-protocol)
Documenting radicle-node v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-node)
Documenting radicle-cli-test v0.13.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-cli-test)
Documenting radicle-remote-helper v0.17.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-remote-helper)
Documenting radicle-fetch v0.20.0 (/94431d01-f52f-4986-af30-69f2617b4465/w/crates/radicle-fetch)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.00s
Generated /94431d01-f52f-4986-af30-69f2617b4465/w/target/doc/radicle/index.html and 21 other files
+ cargo test --workspace --no-fail-fast
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.18s
Running unittests src/lib.rs (target/debug/deps/radicle-52f32f29b14e6444)
running 375 tests
test canonical::formatter::test::ascii_control_characters ... ok
test canonical::formatter::test::securesystemslib_asserts ... ok
test cob::cache::migrations::_2::tests::test_patch_json_deserialization ... ok
test canonical::formatter::test::ordered_nested_object ... ok
test cob::common::test::test_color ... ok
test cob::common::test::test_emojis ... ok
test cob::common::test::test_title ... ok
test cob::cache::tests::test_check_version ... ok
test cob::cache::tests::test_migrate_to ... ok
test cob::cache::migrations::_2::tests::test_migration_2 ... ok
test cob::identity::test::prop_json_eq_str ... ok
test cob::identity::test::test_identity_redact_revision ... ok
test cob::identity::test::test_identity_remove_delegate_concurrent ... ok
test cob::identity::test::test_identity_reject_concurrent ... ok
test cob::identity::test::test_identity_update_rejected ... ok
test cob::identity::test::test_identity_updates ... ok
test cob::issue::cache::tests::test_counts ... ok
test cob::issue::cache::tests::test_get ... ok
test cob::issue::cache::tests::test_is_empty ... ok
test cob::issue::cache::tests::test_list ... ok
test cob::issue::cache::tests::test_list_by_status ... ok
test cob::issue::cache::tests::test_remove ... ok
test cob::identity::test::test_valid_identity ... ok
test cob::identity::test::test_identity_updates_concurrent ... ok
test cob::issue::test::test_embeds ... ok
test cob::issue::test::test_embeds_edit ... ok
test cob::identity::test::test_identity_updates_concurrent_outdated ... ok
test cob::issue::test::test_invalid_actions ... ok
test cob::issue::test::test_invalid_tx_reference ... ok
test cob::issue::test::test_invalid_cob ... ok
test cob::issue::test::test_invalid_tx ... ok
test cob::issue::test::test_concurrency ... ok
test cob::issue::test::test_issue_all ... ok
test cob::issue::test::test_issue_comment ... ok
test cob::issue::test::test_issue_comment_redact ... ok
test cob::issue::test::test_issue_create_and_assign ... ok
test cob::issue::test::test_issue_create_and_get ... ok
test cob::issue::test::test_issue_create_and_change_state ... ok
test cob::issue::test::test_issue_create_and_reassign ... ok
test cob::issue::test::test_issue_create_and_unassign ... ok
test cob::issue::test::test_issue_edit ... ok
test cob::issue::test::test_issue_edit_description ... ok
test cob::issue::test::test_issue_multilines ... ok
test cob::issue::test::test_issue_state_serde ... ok
test cob::issue::test::test_ordering ... ok
test cob::patch::actions::test::test_review_edit ... ok
test cob::issue::test::test_issue_label ... ok
test cob::issue::test::test_issue_react ... ok
test cob::issue::test::test_issue_reply ... ok
test cob::patch::cache::tests::test_is_empty ... ok
test cob::patch::cache::tests::test_find_by_revision ... ok
test cob::patch::cache::tests::test_get ... ok
test cob::patch::cache::tests::test_list ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_null_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_with_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_without_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_v2 ... ok
test cob::patch::encoding::review::test::test_review_summary ... ok
test cob::patch::test::test_json ... ok
test cob::patch::test::test_json_serialization ... ok
test cob::patch::cache::tests::test_remove ... ok
test cob::patch::test::test_patch_create_and_get ... ok
test cob::patch::cache::tests::test_list_by_status ... ok
test cob::patch::test::test_patch_discussion ... ok
test cob::patch::cache::tests::test_counts ... ok
test cob::patch::test::test_patch_merge ... ok
test cob::patch::test::test_patch_review_comment ... ok
test cob::patch::test::test_patch_review ... ok
test cob::patch::test::test_patch_redact ... ok
test cob::patch::test::test_patch_review_duplicate ... ok
test cob::patch::test::test_patch_review_edit ... ok
test cob::patch::test::test_patch_review_remove_summary ... ok
test cob::patch::test::test_reactions_json_serialization ... ok
test cob::patch::test::test_patch_review_edit_comment ... ok
test cob::patch::test::test_revision_reaction ... ok
test cob::patch::test::test_revision_review_merge_redacted ... ok
test cob::patch::test::test_revision_edit_redact ... ok
test cob::stream::tests::test_all_from_until ... ok
test cob::stream::tests::test_all_from ... ok
test cob::stream::tests::test_all_until ... ok
test cob::patch::test::test_patch_review_revision_redact ... ok
test cob::stream::tests::test_regression_from_until ... ok
test cob::thread::tests::test_comment_edit_missing ... ok
test cob::stream::tests::test_from_until ... ok
test cob::thread::tests::test_comment_edit_redacted ... ok
test cob::thread::tests::test_comment_redact_missing ... ok
test cob::thread::tests::test_duplicate_comments ... ok
test cob::thread::tests::test_edit_comment ... ok
test cob::thread::tests::test_redact_comment ... ok
test git::canonical::protect::tests::refs_rad ... ok
test git::canonical::protect::tests::refs_rad_id ... ok
test git::canonical::protect::tests::refs_radieschen ... ok
test git::canonical::quorum::test::merge_base_commutative ... ok
test git::canonical::quorum::test::test_merge_bases ... ok
test cob::thread::tests::test_timeline ... ok
test git::canonical::rules::test::deserialization ... ok
test git::canonical::rules::test::deserialize_extensions ... ok
test git::canonical::rules::test::matches_exactly_curly_braces ... ok
test git::canonical::rules::test::matches_expands_globs_appropriately ... ok
test git::canonical::rules::test::ordering ... ok
test cob::patch::test::test_patch_update ... ok
test git::canonical::rules::test::property::prefix ... ok
test git::canonical::rules::test::property::identity ... ok
test git::canonical::rules::test::property::suffix ... ok
test git::canonical::rules::test::property::prefix_negative ... ok
test git::canonical::rules::test::property::suffix_negative ... ok
test git::canonical::rules::test::roundtrip ... ok
test git::canonical::rules::test::property::trailing_asterisk_partial_component ... ok
test git::canonical::rules::test::rule_validate_success ... ok
test git::canonical::rules::test::special_branches ... ok
test git::canonical::symbolic::test::deserialize_infinite ... ok
test git::canonical::symbolic::test::deserialize_order ... ok
test git::canonical::symbolic::test::deserialize_valid ... ok
test git::canonical::symbolic::test::infinite_extend ... ok
test git::canonical::symbolic::test::infinite_multi ... ok
test git::canonical::symbolic::test::infinite_single ... ok
test git::canonical::symbolic::test::reclassification_combine ... ok
test git::canonical::symbolic::test::reclassification_combine_reverse ... ok
test git::canonical::symbolic::test::reclassification_diamond ... ok
test git::canonical::symbolic::test::reclassification_order_invariant ... ok
test git::canonical::symbolic::test::reclassification_reverse_chain ... ok
test git::canonical::symbolic::test::resolve_two_hop_chain ... ok
test git::canonical::symbolic::test::target_classification ... ok
test git::canonical::symbolic::test::target_classification_symbolic ... ok
test git::canonical::symbolic::test::target_reclassification ... ok
test git::canonical::symbolic::test::target_reclassification_commutative ... ok
test git::canonical::tests::test_commit_quorum_fork_of_a_fork ... ok
test git::canonical::tests::test_commit_quorum_forked_merge_commits ... ok
test git::canonical::tests::test_commit_quorum_groups ... ok
test git::canonical::tests::test_commit_quorum_linear ... ok
test git::canonical::tests::test_commit_quorum_merges ... ok
test git::canonical::tests::test_commit_quorum_single ... ok
test git::canonical::tests::test_commit_quorum_three_way_fork ... ok
test git::canonical::tests::test_commit_quorum_two_way_fork ... ok
test git::canonical::tests::test_quorum_different_types ... ok
test git::canonical::rules::test::canonical ... ok
test git::canonical::tests::test_tag_quorum ... ok
test git::test::test_version_from_str ... ok
test git::test::test_version_ord ... ok
test identity::crefs::tests::invalid_clash ... ok
test identity::crefs::tests::invalid_clash_asterisk_name ... ok
test identity::crefs::tests::invalid_dangling ... ok
test identity::crefs::tests::omit_symbolic ... ok
test identity::crefs::tests::valid ... ok
test identity::crefs::tests::valid_asterisk_target ... ok
test identity::did::test::test_did_encode_decode ... ok
test identity::did::test::test_did_vectors ... ok
test identity::doc::test::default_branch_clash ... ok
test identity::doc::test::default_branch_without_project ... ok
test git::canonical::rules::test::rule_validate_failures ... ok
test identity::doc::test::test_canonical_doc ... ok
test identity::doc::test::test_canonical_example ... ok
test identity::doc::test::test_duplicate_dids ... ok
test identity::doc::test::test_future_version_error ... ok
test identity::doc::test::test_is_valid_version ... ok
test identity::doc::test::test_max_delegates ... ok
test identity::doc::test::test_not_found ... ok
test identity::doc::test::test_parse_version ... ok
test identity::doc::test::test_visibility_json ... ok
test identity::doc::update::test::test_can_update_crefs ... ok
test identity::doc::update::test::test_cannot_include_default_branch_rule ... ok
test identity::doc::update::test::test_default_branch_rule_exists_after_verification ... ok
test identity::project::test::test_project_name ... ok
test node::address::store::test::test_alias ... ok
test node::address::store::test::test_disconnected ... ok
test node::address::store::test::test_disconnected_ban ... ok
test node::address::store::test::test_empty ... ok
test node::address::store::test::test_entries ... ok
test node::address::store::test::test_entries_skips_unparsable_address ... ok
test node::address::store::test::test_get_none ... ok
test node::address::store::test::test_insert_and_get ... ok
test node::address::store::test::test_insert_and_remove ... ok
test node::address::store::test::test_insert_and_update ... ok
test node::address::store::test::test_insert_duplicate ... ok
test node::address::store::test::test_node_aliases ... ok
test node::address::store::test::test_remove_nothing ... ok
test node::command::test::command_result ... ok
test node::config::test::deserialize_migrating_scope ... ok
test node::config::test::fetch_level_min ... ok
test node::config::test::onion_absent ... ok
test node::config::test::onion_null ... ok
test node::config::test::partial ... ok
test node::config::test::regression_ipv6_address_brackets ... ok
test node::config::test::regression_ipv6_address_no_brackets ... ok
test node::config::test::serialize_migrating_scope ... ok
test node::config::test::user_agent_custom ... ok
test node::config::test::user_agent_default ... ok
test node::config::test::user_agent_default_explicit ... ok
test node::config::test::user_agent_opt_out ... ok
test node::db::config::test::database_config_valid_combinations ... ok
test node::db::config::test::invalid ... ok
test node::db::test::migration_8::all_ipv6_formatted_dns_addresses_are_retyped ... ok
test node::db::test::migration_8::dns_address_starting_with_bracket_but_missing_closing_bracket_colon_is_unaffected ... ok
test node::db::test::migration_8::dns_address_with_bracket_not_at_start_is_unaffected ... ok
test node::db::test::migration_8::ipv4_address_is_unaffected ... ok
test node::db::test::migration_8::ipv6_formatted_dns_address_is_deleted_when_correct_ipv6_row_already_exists ... ok
test node::db::test::migration_8::ipv6_formatted_dns_address_is_retyped_to_ipv6 ... ok
test git::canonical::tests::test_quorum_properties ... ok
test node::db::test::migration_8::migration_applies_to_all_nodes ... ok
test node::db::test::migration_8::retype_preserves_address_metadata ... ok
test node::db::test::migration_8::plain_dns_hostname_without_brackets_is_unaffected ... ok
test node::db::test::migration_9::bracketed_non_ipv6_garbage_is_deleted ... ok
test node::db::test::migration_9::dns_row_is_unaffected_even_when_inner_part_has_no_colon ... ok
test node::db::test::migration_9::empty_brackets_ipv6_row_is_deleted ... ok
test node::db::test::migration_9::ipv4_row_is_unaffected ... ok
test node::db::test::migration_9::full_ipv6_address_is_kept ... ok
test node::db::test::migration_9::loopback_address_is_kept ... ok
test node::db::test::migration_9::unspecified_address_is_kept ... ok
test node::features::test::test_operations ... ok
test node::db::test::test_version ... ok
test node::notifications::store::test::test_branch_notifications ... ok
test node::notifications::store::test::test_clear ... ok
test node::notifications::store::test::test_cob_notifications ... ok
test node::notifications::store::test::test_counts_by_repo ... ok
test node::notifications::store::test::test_duplicate_notifications ... ok
test node::notifications::store::test::test_notification_status ... ok
test node::policy::store::test::test_follow_and_unfollow_node ... ok
test node::policy::store::test::test_node_policies ... ok
test node::policy::store::test::test_node_aliases ... ok
test node::policy::store::test::test_node_policy ... ok
test node::policy::store::test::test_repo_policies ... ok
test node::policy::store::test::test_repo_policy ... ok
test node::policy::store::test::test_seed_and_unseed_repo ... ok
test node::policy::store::test::test_update_alias ... ok
test node::policy::store::test::test_update_scope ... ok
test node::refs::store::test::test_count ... ok
test node::refs::store::test::test_set_and_delete ... ok
test node::refs::store::test::test_set_and_get ... ok
test node::routing::test::test_count ... ok
test node::routing::test::test_entries ... ok
test cob::thread::tests::prop_ordering ... ok
test node::routing::test::test_insert_and_get ... ok
test node::routing::test::test_insert_duplicate ... ok
test node::routing::test::test_insert_and_get_resources ... ok
test node::routing::test::test_insert_existing_updated_time ... ok
test node::routing::test::test_len ... ok
test node::routing::test::test_remove_many ... ok
test node::routing::test::test_insert_and_remove ... ok
test node::routing::test::test_remove_redundant ... ok
test node::routing::test::test_update_existing_multi ... ok
test node::sync::announce::test::announcer_adapts_target_to_reach ... ok
test node::sync::announce::test::all_synced_nodes_are_preferred_seeds ... ok
test node::sync::announce::test::announcer_reached_max_replication_target ... ok
test node::sync::announce::test::announcer_preferred_seeds_or_replica_factor ... ok
test node::routing::test::test_prune ... ok
test node::sync::announce::test::announcer_reached_preferred_seeds ... ok
test node::sync::announce::test::announcer_synced_with_unknown_node ... ok
test node::sync::announce::test::announcer_with_replication_factor_zero_and_preferred_seeds ... ok
test node::sync::announce::test::announcer_reached_min_replication_target ... ok
test node::sync::announce::test::announcer_timed_out ... ok
test node::sync::announce::test::construct_node_appears_in_multiple_input_sets ... ok
test node::sync::announce::test::construct_only_preferred_seeds_provided ... ok
test node::sync::announce::test::cannot_construct_announcer ... ok
test node::sync::announce::test::invariant_progress_should_match_state ... ok
test node::sync::announce::test::local_node_in_preferred_seeds ... ok
test node::sync::announce::test::local_node_in_synced_set ... ok
test node::sync::announce::test::local_node_only_in_all_sets_results_in_no_seeds_error ... ok
test node::sync::announce::test::local_node_in_multiple_sets ... ok
test node::sync::announce::test::local_node_in_unsynced_set ... ok
test node::sync::announce::test::synced_with_local_node_is_ignored ... ok
test node::sync::announce::test::preferred_seeds_already_synced ... ok
test node::sync::announce::test::synced_with_same_node_multiple_times ... ok
test node::sync::announce::test::timed_out_after_reaching_success ... ok
test node::sync::fetch::test::all_nodes_are_candidates ... ok
test node::sync::fetch::test::could_not_reach_target ... ok
test node::sync::fetch::test::ignores_duplicates_and_local_node ... ok
test node::sync::fetch::test::all_nodes_are_fetchable ... ok
test node::sync::fetch::test::reaches_target_of_max_replicas ... ok
test node::sync::fetch::test::preferred_seeds_target_returned_over_replicas ... ok
test node::sync::test::ensure_replicas_construction ... ok
test node::sync::fetch::test::reaches_target_of_replicas ... ok
test node::sync::test::replicas_constrain_to ... ok
test node::test::test_alias ... ok
test node::test::test_address ... ok
test node::test::test_command_result ... ok
test node::test::test_user_agent ... ok
test node::timestamp::tests::test_timestamp_max ... ok
test node::sync::fetch::test::reaches_target_of_preferred_seeds ... ok
test profile::test::test_config ... ok
test profile::test::canonicalize_home ... ok
test rad::tests::test_checkout ... ok
test rad::tests::test_fork ... ok
test storage::git::tests::test_references_of ... ok
test rad::tests::test_init ... ok
test storage::git::transport::local::url::test::test_url_parse ... ok
test storage::git::transport::local::url::test::test_url_to_string ... ok
test storage::git::transport::remote::url::test::test_url_parse ... ok
test storage::git::tests::test_sign_refs ... ok
test profile::config::test::schema ... ok
test identity::doc::test::prop_encode_decode ... ok
test storage::refs::sigrefs::git::properties::idempotent_write ... ok
test storage::refs::sigrefs::git::properties::initial_commit_roundtrip ... ok
test storage::refs::sigrefs::read::test::commit_reader::identity_root_error ... ok
test storage::refs::sigrefs::read::test::commit_reader::missing_commit ... ok
test storage::refs::sigrefs::read::test::commit_reader::read_ok ... ok
test storage::refs::sigrefs::read::test::commit_reader::too_many_parents ... ok
test storage::refs::sigrefs::read::test::commit_reader::tree_error ... ok
test storage::refs::sigrefs::read::test::identity_root_reader::doc_blob_error ... ok
test storage::refs::sigrefs::read::test::identity_root_reader::missing_identity ... ok
test storage::refs::sigrefs::read::test::identity_root_reader::read_ok_none ... ok
test storage::refs::sigrefs::read::test::identity_root_reader::read_ok_some ... ok
test storage::refs::sigrefs::read::test::resolve_tip::find_reference_error ... ok
test storage::refs::sigrefs::read::test::resolve_tip::missing_sigrefs ... ok
test storage::refs::sigrefs::read::test::resolve_tip::resolve_tip_ok ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::detect_parent::root_without_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::detect_parent::root_without_root ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::downgrade::parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::downgrade::restore ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::downgrade::root ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::downgrade::root_with_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::head_commit_error ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::head_verify_mismatched_identity_error ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::head_verify_signature_error ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::invalid_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::read_ok_no_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::read_ok_parent ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::read_ok_root ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::replay::alternating ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::replay::chain ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::replay::multiple ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::replay::root_at_head ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::single_commit ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::two_commits ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::walk_commit_error ... ok
test storage::refs::sigrefs::read::test::signed_refs_reader::walk_verify_error ... ok
test storage::refs::sigrefs::read::test::tree_reader::missing_both ... ok
test storage::refs::sigrefs::read::test::tree_reader::missing_refs ... ok
test storage::refs::sigrefs::read::test::tree_reader::missing_signature ... ok
test storage::refs::sigrefs::read::test::tree_reader::parse_refs_error ... ok
test storage::refs::sigrefs::read::test::tree_reader::parse_signature_error ... ok
test storage::refs::sigrefs::read::test::tree_reader::read_ok ... ok
test storage::refs::sigrefs::read::test::tree_reader::read_refs_error ... ok
test storage::refs::sigrefs::read::test::tree_reader::read_signature_error ... ok
test storage::refs::sigrefs::write::test::commit_writer::tree_error ... ok
test storage::refs::sigrefs::write::test::commit_writer::write_commit_error ... ok
test storage::refs::sigrefs::write::test::commit_writer::write_empty_refs ... ok
test storage::refs::sigrefs::write::test::commit_writer::write_root_ok ... ok
test storage::refs::sigrefs::write::test::commit_writer::write_with_parent_ok ... ok
test storage::refs::sigrefs::write::test::head_reader::no_head ... ok
test storage::refs::sigrefs::write::test::head_reader::read_ok ... ok
test storage::refs::sigrefs::write::test::head_reader::reference_error ... ok
test storage::refs::sigrefs::write::test::head_reader::refs_blob_error ... ok
test storage::refs::sigrefs::write::test::head_reader::refs_blob_missing ... ok
test storage::refs::sigrefs::write::test::head_reader::refs_parse_error ... ok
test storage::refs::sigrefs::write::test::head_reader::signature_blob_error ... ok
test storage::refs::sigrefs::write::test::head_reader::signature_blob_missing ... ok
test storage::refs::sigrefs::write::test::head_reader::signature_parse_error ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::commit_error ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::head_error ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::never_write_rad_sigrefs ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::reference_error ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::unchanged ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::unchanged_force_writes_new_commit ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::write_empty_refs ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::write_root_ok ... ok
test storage::refs::sigrefs::write::test::signed_refs_writer::write_with_parent_ok ... ok
test storage::refs::sigrefs::write::test::tree_writer::sign_error ... ok
test storage::refs::sigrefs::write::test::tree_writer::write_ok ... ok
test storage::refs::sigrefs::write::test::tree_writer::write_tree_error ... ok
test storage::refs::tests::prop_canonical_roundtrip ... ok
test storage::refs::tests::test_rid_verification ... ok
test storage::tests::test_storage ... ok
test test::assert::test::assert_with_message ... ok
test test::assert::test::test_assert_no_move ... ok
test test::assert::test::test_assert_panic_0 - should panic ... ok
test test::assert::test::test_assert_panic_1 - should panic ... ok
test test::assert::test::test_assert_panic_2 - should panic ... ok
test test::assert::test::test_assert_succeed ... ok
test test::assert::test::test_panic_message ... ok
test version::test::test_version ... ok
test web::test::description_only ... ok
test web::test::pinned_empty ... ok
test storage::refs::sigrefs::property::idempotent ... ok
test storage::refs::sigrefs::property::roundtrip ... ok
test storage::refs::sigrefs::git::properties::chain_roundtrip ... ok
test result: ok. 375 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.18s
Running unittests src/lib.rs (target/debug/deps/radicle_cli-75efc5d6742d7f21)
running 46 tests
test commands::block::args::test::should_not_parse ... ok
test commands::block::args::test::should_parse_nid ... ok
test commands::block::args::test::should_parse_rid ... ok
test commands::clone::args::test::should_parse_rid_url ... ok
test commands::clone::args::test::should_parse_rid_non_urn ... ok
test commands::clone::args::test::should_parse_rid_urn ... ok
test commands::cob::args::test::should_allow_log_json_format ... ok
test commands::cob::args::test::should_allow_log_pretty_format ... ok
test commands::cob::args::test::should_allow_show_json_format ... ok
test commands::cob::args::test::should_allow_update_json_format ... ok
test commands::fork::args::test::should_not_parse_rid_url ... ok
test commands::cob::args::test::should_not_allow_update_pretty_format ... ok
test commands::fork::args::test::should_parse_rid_non_urn ... ok
test commands::fork::args::test::should_parse_rid_urn ... ok
test commands::cob::args::test::should_not_allow_show_pretty_format ... ok
test commands::id::args::test::should_not_clobber_payload_args ... ok
test commands::id::args::test::should_parse_into_payload ... ok
test commands::id::args::test::should_not_parse_into_payload - should panic ... ok
test commands::id::args::test::should_not_parse_single_payload ... ok
test commands::id::args::test::should_not_parse_single_payloads ... ok
test commands::id::args::test::should_parse_single_payload ... ok
test commands::id::args::test::should_parse_multiple_payloads ... ok
test commands::init::args::test::should_not_parse_rid_url ... ok
test commands::init::args::test::should_parse_rid_urn ... ok
test commands::init::args::test::should_parse_rid_non_urn ... ok
test commands::inspect::test::test_tree ... ok
test commands::patch::review::builder::tests::test_review_comments_basic ... ok
test commands::patch::review::builder::tests::test_review_comments_split_hunk ... ok
test commands::patch::review::builder::tests::test_review_comments_multiline ... ok
test commands::publish::args::test::should_parse_rid_non_urn ... ok
test commands::publish::args::test::should_not_parse_rid_url ... ok
test commands::publish::args::test::should_parse_rid_urn ... ok
test git::pretty_diff::test::test_pretty ... ignored
test git::ddiff::tests::diff_encode_decode_ddiff_hunk ... ok
test git::unified_diff::test::test_diff_content_encode_decode_content ... ok
test terminal::args::test::should_not_parse ... ok
test commands::patch::review::builder::tests::test_review_comments_before ... ok
test commands::watch::args::test::should_parse_ref_str ... ok
test git::unified_diff::test::test_diff_encode_decode_diff ... ok
test terminal::args::test::should_parse_nid ... ok
test terminal::args::test::should_parse_rid ... ok
test terminal::format::test::test_bytes ... ok
test terminal::format::test::test_strip_comments ... ok
test terminal::patch::test::test_edit_display_message ... ok
test terminal::patch::test::test_create_display_message ... ok
test terminal::patch::test::test_update_display_message ... ok
test result: ok. 45 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.01s
Running unittests src/main.rs (target/debug/deps/rad-24c4c09b4e5fff17)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/commands.rs (target/debug/deps/commands-af28809b44ba8bae)
running 118 tests
test commands::clone::rad_clone ... ok
test commands::clone::rad_clone_bare ... ok
test commands::checkout::rad_checkout ... ok
test commands::clone::rad_clone_all ... ok
test commands::clone::rad_clone_scope ... ok
test commands::clone::rad_clone_directory ... ok
test commands::clone::rad_clone_unknown ... ok
test commands::clone::rad_clone_connect ... ok
test commands::clone::rad_clone_partial_fail ... ok
test commands::cob::rad_cob_multiset ... ok
test commands::clone::test_clone_without_seeds ... ok
test commands::cob::rad_cob_log ... ok
test commands::cob::rad_cob_migrate ... ok
test commands::cob::rad_cob_operations ... ok
test commands::cob::rad_cob_show ... ok
test commands::cob::rad_cob_update_identity ... ok
test commands::cob::rad_cob_update ... ok
test commands::cob::test_cob_deletion ... ok
test commands::cob::test_cob_replication ... ok
test commands::git::git_push_amend ... ok
test commands::git::git_push_and_fetch ... ok
test commands::git::git_push_canonical_lightweight_tags ... ok
test commands::git::git_push_diverge ... ok
test commands::git::git_push_force_with_lease ... ok
test commands::git::git_push_canonical ... ok
test commands::git::git_push_converge ... ok
test commands::id::rad_id_collaboration ... ignored, slow
test commands::git::git_push_rollback ... ok
test commands::id::rad_id ... ok
test commands::git::git_tag ... ok
test commands::id::rad_id_private ... ok
test commands::id::rad_id_threshold_soft_fork ... ok
test commands::id::rad_id_conflict ... ok
test commands::id::rad_id_threshold ... ok
test commands::id::rad_id_unknown_field ... ok
test commands::id::rad_id_update_delete_field ... ok
test commands::init::rad_init ... ignored, part of many other tests
test commands::id::rad_id_unauthorized_delegate ... ok
test commands::init::rad_init_detached_head ... ok
test commands::id::rad_id_multi_delegate ... ok
test commands::init::rad_init_bare ... ok
test commands::init::rad_init_existing ... ok
test commands::init::rad_init_no_git ... ok
test commands::init::rad_init_existing_bare ... ok
test commands::init::rad_init_private ... ok
test commands::init::rad_init_no_seed ... ok
test commands::init::rad_init_private_no_seed ... ok
test commands::init::rad_init_private_clone ... ok
test commands::inbox::rad_inbox ... ok
test commands::init::rad_init_private_clone_seed ... ok
test commands::init::rad_init_private_seed ... ok
test commands::init::rad_init_sync_not_connected ... ok
test commands::init::rad_init_sync_preferred ... ok
test commands::init::rad_init_with_existing_remote ... ok
test commands::init::rad_publish ... ok
test commands::issue::rad_issue ... ok
test commands::jj::rad_jj_bare ... ignored, the bare repository does not have a `rad` remote, and so it cannot determine the RID of the repository
test commands::jj::rad_jj_colocated_patch ... ok
test commands::issue::rad_issue_list ... ok
test commands::node::rad_node_connect ... ok
test commands::node::rad_node_connect_without_address ... ok
test commands::patch::rad_merge_after_update ... ok
test commands::node::rad_node ... ok
test commands::patch::rad_merge_no_ff ... ok
test commands::patch::rad_merge_via_push ... ok
test commands::patch::rad_patch ... ok
test commands::patch::rad_patch_ahead_behind ... ok
test commands::patch::rad_patch_change_base ... ok
test commands::patch::rad_patch_checkout ... ok
test commands::init::rad_init_sync_and_clone ... ok
test commands::init::rad_init_sync_timeout ... ok
test commands::patch::rad_patch_detached_head ... ok
test commands::patch::rad_patch_checkout_revision ... ok
test commands::patch::rad_patch_diff ... ok
test commands::patch::rad_patch_checkout_force ... ok
test commands::patch::rad_patch_draft ... ok
test commands::patch::rad_patch_fetch_2 ... ok
test commands::patch::rad_patch_edit ... ok
test commands::patch::rad_patch_fetch_1 ... ok
test commands::patch::rad_patch_merge_draft ... ok
test commands::patch::rad_patch_delete ... ok
test commands::patch::rad_patch_revert_merge ... ok
test commands::patch::rad_patch_open_explore ... ok
test commands::patch::rad_patch_update ... ok
test commands::patch::rad_review_by_hunk ... ok
test commands::patch::rad_patch_via_push ... ok
test commands::policy::rad_block ... ok
test commands::policy::rad_seed_and_follow ... ok
test commands::policy::rad_seed_policy_allow_no_scope ... ok
test commands::policy::rad_seed_scope ... ok
test commands::policy::rad_unseed ... ok
test commands::policy::rad_seed_many ... ok
test commands::policy::rad_unseed_many ... ok
test commands::sigpipe::config ... ok
test commands::sigpipe::help ... ok
test commands::sigpipe::rad_self ... ok
test commands::patch::rad_push_and_pull_patches ... ok
test commands::remote::rad_remote ... ok
test commands::sync::rad_sync_without_node ... ok
test commands::sync::rad_sync ... ok
test commands::utility::framework_home ... ok
test commands::utility::rad_auth ... ok
test commands::utility::rad_auth_errors ... ok
test commands::patch::rad_patch_pull_update ... ok
test commands::utility::rad_config ... ok
test commands::utility::rad_clean ... ok
test commands::utility::rad_diff ... ok
test commands::utility::rad_help ... ok
test commands::utility::rad_inspect ... ok
test commands::utility::rad_key_mismatch ... ok
test commands::utility::rad_self ... ok
test commands::utility::rad_warn_old_nodes ... ok
test commands::sync::rad_fetch ... ok
test commands::watch::rad_watch ... ok
test rad_remote ... ok
test commands::sync::test_replication_via_seed ... ok
test commands::workflow::rad_workflow ... ok
test commands::utility::rad_fork ... ok
test result: ok. 115 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 76.18s
Running unittests src/lib.rs (target/debug/deps/radicle_cli_test-0ffd2ed377c44063)
running 3 tests
test tests::test_parse ... ok
test tests::test_run ... ok
test tests::test_example_spaced_brackets ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_cob-702c81b27ab43842)
running 9 tests
test object::tests::test_serde ... ok
test tests::git::update_cob ... ok
test tests::git::traverse_cobs ... ok
test tests::invalid_parse_refstr ... ok
test type_name::test::invalid_typenames ... ok
test type_name::test::valid_typenames ... ok
test tests::git::roundtrip ... ok
test tests::parse_refstr ... ok
test tests::git::list_cobs ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Running unittests src/lib.rs (target/debug/deps/radicle_core-3d8a5be0f9b0e47e)
running 4 tests
test repo::test::invalid ... ok
test repo::test::valid ... ok
test repo::test::assert_prop_roundtrip_parse ... ok
test repo::serde_impls::test::assert_prop_roundtrip_serde_json ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_crypto-ef87a572eac2766d)
running 11 tests
test ssh::agent::test::test_agent_encoding_remove ... ok
test ssh::agent::test::test_agent_encoding_sign ... ok
test ssh::fmt::test::test_fingerprint ... ok
test ssh::fmt::test::test_key ... ok
test ssh::keystore::tests::test_init_no_passphrase ... ok
test tests::prop_encode_decode ... ok
test tests::test_e25519_dh ... ok
test tests::test_encode_decode ... ok
test tests::prop_key_equality ... ok
test ssh::keystore::tests::test_signer ... ok
test ssh::keystore::tests::test_init_passphrase ... ok
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.83s
Running unittests src/lib.rs (target/debug/deps/radicle_dag-e10cdde88570a8e0)
running 20 tests
test tests::test_contains ... ok
test tests::test_cycle ... ok
test tests::test_dependencies ... ok
test tests::test_diamond ... ok
test tests::test_fold_diamond ... ok
test tests::test_fold_multiple_roots ... ok
test tests::test_complex ... ok
test tests::test_get ... ok
test tests::test_fold_reject ... ok
test tests::test_is_empty ... ok
test tests::test_len ... ok
test tests::test_fold_sorting_1 ... ok
test tests::test_fold_sorting_2 ... ok
test tests::test_merge_1 ... ok
test tests::test_merge_2 ... ok
test tests::test_prune_1 ... ok
test tests::test_prune_2 ... ok
test tests::test_siblings ... ok
test tests::test_prune_by_sorting ... ok
test tests::test_remove ... ok
test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_fetch-c1d8a466727fdbd1)
running 1 test
test stage::test::valid_refspecs ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_git_metadata-41b02b9ef3e2236d)
running 24 tests
test commit::parse::test::error::invalid_author ... ok
test commit::parse::test::error::invalid_committer ... ok
test commit::parse::test::error::invalid_format_continuation_without_preceding_header ... ok
test commit::parse::test::error::invalid_parent ... ok
test commit::parse::test::error::invalid_tree ... ok
test commit::parse::test::error::missing_author ... ok
test commit::parse::test::error::missing_committer ... ok
test commit::parse::test::error::missing_header_body_separator ... ok
test commit::parse::test::error::missing_tree_empty_header ... ok
test commit::parse::test::error::missing_tree_wrong_first_line ... ok
test commit::parse::test::success::commit_gpgsig_is_preserved_and_strip_removes_it ... ok
test commit::parse::test::success::commit_with_extra_headers ... ok
test commit::parse::test::success::commit_last_paragraph_kept_in_message_when_not_all_trailers ... ok
test commit::parse::test::success::commit_with_multiline_gpgsig ... ok
test commit::parse::test::success::commit_with_single_parent ... ok
test commit::parse::test::success::commit_with_trailers ... ok
test commit::parse::test::success::root_commit ... ok
test commit::parse::test::success::merge_commit ... ok
test commit::parse::test::success::roundtrip ... ok
test commit::parse::test::unit::body_last_paragraph_not_trailers_stays_in_message ... ok
test commit::parse::test::unit::body_no_paragraph_separator_means_no_trailers ... ok
test commit::parse::test::unit::trailers_rejects_invalid_token_chars ... ok
test commit::parse::test::unit::trailers_accepts_empty_input ... ok
test commit::parse::test::unit::trailers_rejects_line_without_separator ... ok
test result: ok. 24 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_git_ref_format-2868a65b3ff2c590)
running 9 tests
test test::component ... ok
test test::component_invalid - should panic ... ok
test test::pattern ... ok
test test::qualified ... ok
test test::qualified_pattern ... ok
test test::qualified_pattern_invalid - should panic ... ok
test test::refname ... ok
test test::refname_invalid - should panic ... ok
test test::qualified_invalid - should panic ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_localtime-ec55a7767b981c91)
running 1 test
test serde_impls::test::test_localtime ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_log-aa8a5607eeb05b0d)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_node-1aaf9cbee6964a06)
running 80 tests
test reactor::timer::tests::test_next ... ok
test reactor::timer::tests::test_wake ... ok
test reactor::timer::tests::test_wake_exact ... ok
test control::tests::test_control_socket ... ok
test control::tests::test_seed_unseed ... ok
test fingerprint::tests::matching ... ok
test tests::e2e::fetch_does_not_contain_rad_sigrefs_parent ... ok
test tests::e2e::missing_default_branch ... ok
test tests::e2e::missing_delegate_default_branch ... ok
test tests::e2e::test_background_foreground_fetch ... ok
test tests::e2e::test_block_prevents_connection ... ok
test tests::e2e::test_block_active_connection ... ok
test tests::e2e::test_block_prevents_fetch ... ok
test tests::e2e::test_channel_reader_limit ... ok
test tests::e2e::test_catchup_on_refs_announcements ... ok
test tests::e2e::test_clone ... ok
test tests::e2e::test_connection_crossing ... ok
test tests::e2e::test_dont_fetch_owned_refs ... ok
test tests::e2e::test_fetch_emits_canonical_ref_update_partial_glob ... ok
test tests::e2e::test_fetch_followed_remotes ... ok
test tests::e2e::test_fetch_preserve_owned_refs ... ok
test tests::e2e::test_concurrent_fetches ... ok
test tests::e2e::test_fetch_up_to_date ... ok
test tests::e2e::test_fetch_unseeded ... ok
test tests::e2e::test_inventory_sync_basic ... ok
test tests::e2e::test_fetch_emits_canonical_ref_update ... ok
test tests::e2e::test_large_fetch ... ok
test tests::e2e::test_migrated_clone ... ok
test tests::e2e::test_missing_remote ... ok
test tests::e2e::test_multiple_offline_inits ... ok
test tests::e2e::test_non_fast_forward_identity_doc ... ok
test tests::e2e::test_non_fast_forward_sigrefs ... ok
test tests::e2e::test_outdated_delegate_sigrefs ... ok
test tests::e2e::test_outdated_sigrefs ... ok
test tests::e2e::test_inventory_sync_bridge ... ok
test tests::e2e::test_inventory_sync_ring ... ok
test tests::e2e::test_replication ... ok
test tests::e2e::test_inventory_sync_star ... ok
test tests::e2e::test_replication_invalid ... ok
test tests::test_announcement_rebroadcast ... ok
test tests::e2e::test_replication_ref_in_sigrefs ... ok
test tests::test_announcement_rebroadcast_timestamp_filtered ... ok
test tests::test_announcement_rebroadcast_duplicates ... ok
test tests::test_connection_kept_alive ... ok
test tests::test_announcement_relay ... ok
test tests::test_disconnecting_unresponsive_peer ... ok
test tests::test_fetch_missing_inventory_on_gossip ... ok
test tests::test_fetch_missing_inventory_on_schedule ... ok
test tests::test_inbound_connection ... ok
test tests::test_inventory_decode ... ok
test tests::test_init_and_seed ... ok
test tests::test_inventory_relay ... ok
test tests::test_inventory_relay_bad_timestamp ... ok
test tests::test_inventory_sync ... ok
test tests::test_maintain_connections ... ok
test tests::test_maintain_connections_failed_attempt ... ok
test tests::test_maintain_connections_transient ... ok
test tests::test_outbound_connection ... ok
test tests::test_inventory_pruning ... ok
test tests::test_persistent_peer_connect ... ok
test tests::test_persistent_peer_reconnect_attempt ... ok
test tests::test_persistent_peer_reconnect_success ... ok
test tests::test_ping_response ... ok
test tests::test_queued_fetch_from_ann_same_rid ... ok
test tests::test_queued_fetch_from_command_same_rid ... ok
test tests::test_queued_fetch_max_capacity ... ok
test tests::test_redundant_connect ... ok
test tests::test_refs_announcement_fetch_trusted_no_inventory ... ok
test tests::test_refs_announcement_followed ... ok
test tests::test_refs_announcement_no_subscribe ... ok
test tests::test_refs_announcement_offline ... ok
test tests::prop_inventory_exchange_dense ... ok
test tests::test_refs_announcement_relay_private ... ok
test tests::test_refs_announcement_relay_public ... ok
test tests::test_announcement_message_amplification ... ok
test wire::test::test_inventory_ann_with_extension ... ok
test wire::test::test_pong_message_with_extension ... ok
test tests::test_seeding ... ok
test tests::test_seed_repo_subscribe ... ok
test tests::test_refs_synced_event ... ok
test result: ok. 80 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 15.80s
Running unittests src/main.rs (target/debug/deps/radicle_node-4883601b78d2da96)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_oid-899d6afb9a9d0dcb)
running 10 tests
test fmt::test::fixture ... ok
test fmt::test::zero ... ok
test git2::test::zero ... ok
test fmt::test::git2 ... ok
test fmt::test::gix ... ok
test gix::test::zero ... ok
test str::test::fixture ... ok
test str::test::git2_roundtrip ... ok
test str::test::gix_roundtrip ... ok
test str::test::zero ... ok
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_protocol-74198955a1117dc2)
running 99 tests
test deserializer::test::test_unparsed ... ok
test deserializer::test::test_decode_next ... ok
test deserializer::test::prop_decode_next ... ok
test fetcher::service::tests::test_fetch_coalescing_different_refs ... ok
test fetcher::test::queue::properties::capacity::bounded ... ok
test fetcher::test::queue::properties::capacity::rejection ... ok
test fetcher::test::queue::properties::dequeue::empty_queue_returns_none ... ok
test fetcher::test::queue::properties::dequeue::enables_reenqueue ... ok
test fetcher::test::queue::properties::capacity::restored_after_dequeue ... ok
test fetcher::test::queue::properties::capacity::capacity_reached_returns_same_item ... ok
test fetcher::test::queue::properties::dequeue::drained_queue_returns_none ... ok
test fetcher::test::queue::properties::fifo::interleaved_operations ... ok
test fetcher::test::queue::properties::fifo::ordering ... ok
test fetcher::test::queue::properties::equality::reflexive ... ok
test fetcher::test::queue::properties::merge::different_rid_accepted ... ok
test fetcher::test::queue::properties::equality::symmetric ... ok
test fetcher::test::queue::properties::merge::combines_refs ... ok
test fetcher::test::queue::properties::merge::longer_timeout_preserved ... ok
test fetcher::test::queue::properties::equality::transitive ... ok
test fetcher::test::queue::properties::merge::does_not_increase_queue_length ... ok
test fetcher::test::queue::unit::capacity_takes_precedence_over_merge_for_new_items ... ok
test fetcher::test::queue::unit::empty_refs_items_can_be_equal ... ok
test fetcher::test::queue::unit::max_timeout_accepted ... ok
test fetcher::test::queue::unit::merge_preserves_position_in_queue ... ok
test fetcher::test::queue::unit::zero_timeout_accepted ... ok
test fetcher::test::state::command::cancel::cancellation_is_isolated ... ok
test fetcher::test::state::command::cancel::non_existent_returns_unexpected ... ok
test fetcher::test::state::command::cancel::ongoing_and_queued ... ok
test fetcher::test::state::command::cancel::single_ongoing ... ok
test fetcher::test::state::command::fetch::fetch_after_previous_completed ... ok
test fetcher::test::state::command::fetch::fetch_at_capacity_enqueues ... ok
test fetcher::test::state::command::fetch::fetch_different_repo_same_node_within_capacity ... ok
test fetcher::test::state::command::fetch::fetch_duplicate_returns_already_fetching ... ok
test fetcher::test::state::command::fetch::fetch_queue_merge_empty_refs_fetches_all ... ok
test fetcher::test::state::command::fetch::fetch_queue_merge_takes_longer_timeout ... ok
test fetcher::test::state::command::fetch::fetch_queue_merges_already_queued ... ok
test fetcher::test::state::command::fetch::fetch_queue_rejected_capacity_reached ... ok
test fetcher::test::state::command::fetch::fetch_same_repo_different_nodes_queues_second ... ok
test fetcher::test::state::command::fetch::fetch_same_repo_different_refs_enqueues ... ok
test fetcher::test::state::command::fetch::fetch_start_first_fetch_for_node ... ok
test fetcher::test::queue::properties::merge::empty_refs_fetches_all ... ok
test fetcher::test::state::command::fetched::complete_single_ongoing ... ok
test fetcher::test::state::command::fetched::complete_one_of_multiple ... ok
test fetcher::test::state::command::fetched::non_existent_returns_not_found ... ok
test fetcher::test::state::command::fetched::complete_then_dequeue_fifo ... ok
test fetcher::test::state::concurrent::fetched_then_cancel ... ok
test fetcher::test::state::concurrent::interleaved_operations ... ok
test fetcher::test::state::config::min_queue_size ... ok
test fetcher::test::state::dequeue::cannot_dequeue_while_node_at_capacity ... ok
test fetcher::test::state::dequeue::empty_queue_returns_none ... ok
test fetcher::test::state::dequeue::maintains_fifo_order ... ok
test fetcher::test::state::invariant::queue_integrity_after_merge ... ok
test fetcher::test::queue::properties::merge::succeed_when_at_capacity ... ok
test fetcher::test::state::multinode::independent_queues ... ok
test service::filter::test::compatible ... ok
test service::filter::test::test_parameters ... ok
test fetcher::test::state::config::high_concurrency ... ok
test service::filter::test::test_sizes ... ok
test service::limiter::test::test_limiter_different_rates ... ok
test service::limiter::test::test_limiter_multi ... ok
test service::limiter::test::test_limiter_refill ... ok
test fetcher::test::queue::properties::merge::same_rid_merges_anywhere_in_queue ... ok
test service::gossip::store::test::test_announced ... ok
test service::message::tests::test_inventory_limit ... ok
test service::message::tests::test_ref_remote_limit ... ok
test wire::frame::test::test_encode_git_large ... ok
test wire::frame::test::test_stream_id ... ok
test fetcher::test::state::multinode::high_count ... ok
test wire::message::tests::prop_roundtrip_address ... ok
test service::message::tests::prop_refs_announcement_signing ... ok
test wire::message::tests::prop_zero_bytes_encode_decode ... ok
test wire::message::tests::test_inv_ann_max_size ... ok
test wire::message::tests::test_node_ann_max_size ... ok
test wire::message::tests::test_ping_encode_size_overflow - should panic ... ok
test wire::message::tests::test_pingpong_encode_max_size ... ok
test wire::message::tests::test_pong_encode_size_overflow - should panic ... ok
test service::message::tests::test_node_announcement_validate ... ok
test wire::tests::prop_oid ... ok
test wire::tests::prop_roundtrip_filter ... ok
test wire::tests::prop_roundtrip_publickey ... ok
test wire::tests::prop_roundtrip_refs ... ok
test wire::tests::prop_roundtrip_repoid ... ok
test wire::tests::prop_roundtrip_tuple ... ok
test wire::tests::prop_roundtrip_u16 ... ok
test wire::tests::prop_roundtrip_u32 ... ok
test wire::tests::prop_roundtrip_u64 ... ok
test wire::tests::prop_roundtrip_vec ... ok
test wire::tests::prop_signature ... ok
test wire::tests::prop_string ... ok
test wire::tests::test_alias ... ok
test wire::tests::test_bounded_vec_limit ... ok
test wire::tests::test_filter_invalid ... ok
test wire::tests::test_string ... ok
test wire::varint::test::prop_roundtrip_varint ... ok
test wire::varint::test::test_encode_overflow - should panic ... ok
test wire::varint::test::test_encoding ... ok
test wire::message::tests::prop_roundtrip_message ... ok
test wire::message::tests::test_refs_ann_max_size ... ok
test wire::message::tests::prop_message_decoder ... ok
test result: ok. 99 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.03s
Running unittests src/main.rs (target/debug/deps/git_remote_rad-41e6602d1550b8e7)
running 12 tests
test protocol::tests::test_capabilities ... ok
test protocol::tests::test_empty ... ok
test protocol::tests::test_fetch ... ok
test protocol::tests::test_fetch_whitespace ... ok
test protocol::tests::test_invalid ... ok
test protocol::tests::test_list_for_push ... ok
test protocol::tests::test_list ... ok
test protocol::tests::test_option ... ok
test protocol::tests::test_push ... ok
test protocol::tests::test_option_whitespace_preservation ... ok
test protocol::tests::test_push_delete ... ok
test protocol::tests::test_push_force ... ok
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/main.rs (target/debug/deps/radicle_schemars-290131f689c4a490)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_signals-e91beff5378165d8)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_systemd-77e26f6a607513aa)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_term-afa03b1828121040)
running 21 tests
test ansi::tests::colors_disabled ... ok
test cell::test::test_width ... ok
test ansi::tests::colors_enabled ... ok
test element::test::test_spaced ... ok
test ansi::tests::wrapping ... ok
test element::test::test_truncate ... ok
test element::test::test_width ... ok
test table::test::test_table ... ok
test table::test::test_table_border_truncated ... ok
test table::test::test_table_truncate ... ok
test table::test::test_table_border ... ok
test table::test::test_table_border_maximized ... ok
test table::test::test_table_unicode ... ok
test table::test::test_table_unicode_truncate ... ok
test table::test::test_truncate ... ok
test textarea::test::test_wrapping ... ok
test textarea::test::test_wrapping_code_block ... ok
test textarea::test::test_wrapping_fenced_block ... ok
test textarea::test::test_wrapping_paragraphs ... ok
test vstack::test::test_vstack ... ok
test vstack::test::test_vstack_maximize ... ok
test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_windows-942926f7348a8563)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle
running 1 test
test crates/radicle/src/cob/patch/encoding/review.rs - cob::patch::encoding::review::Review (line 23) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cli
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cli_test
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cob
running 1 test
test crates/radicle-cob/src/backend/stable.rs - backend::stable::with_advanced_timestamp (line 56) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
all doctests ran in 0.09s; merged doctests compilation took 0.09s
Doc-tests radicle_core
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_crypto
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_dag
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_fetch
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_git_metadata
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_git_ref_format
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_localtime
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_log
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_node
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_oid
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_protocol
running 6 tests
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::collect_from (line 30) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::truncate (line 50) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::push (line 122) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::max (line 96) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::with_capacity (line 66) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::unbound (line 149) ... ok
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
all doctests ran in 0.43s; merged doctests compilation took 0.42s
Doc-tests radicle_signals
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_systemd
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_term
running 1 test
test crates/radicle-term/src/table.rs - table (line 4) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
all doctests ran in 0.20s; merged doctests compilation took 0.19s
Doc-tests radicle_windows
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Exit code: 0
{
"response": "finished",
"result": "success"
}