radicle: Remove ReadRepository::identity_root_of

This function is unused.
This commit is contained in:
Lorenz Leutgeb
2026-08-23 20:51:13 +02:00
parent 388d985578
commit 675b82f344
4 changed files with 0 additions and 26 deletions
-3
View File
@@ -545,9 +545,6 @@ pub trait ReadRepository: Sized + ValidateRepository {
/// Get the root commit of the canonical identity branch.
fn identity_root(&self) -> Result<Oid, RepositoryError>;
/// Get the root commit of the identity branch of a specific remote.
fn identity_root_of(&self, remote: &RemoteId) -> Result<Oid, RepositoryError>;
/// Load the identity history.
fn identity(&self) -> Result<Identity, RepositoryError>
where
-15
View File
@@ -891,21 +891,6 @@ impl ReadRepository for Repository {
Ok(root.into())
}
fn identity_root_of(&self, remote: &RemoteId) -> Result<Oid, RepositoryError> {
// Remotes that run newer clients will have this reference set. For older clients,
// compute the root OID based on the identity head.
if let Ok(root) = self.reference_oid(remote, &git::refs::storage::IDENTITY_ROOT) {
return Ok(root);
}
let oid = self.identity_head_of(remote)?;
let root = self
.revwalk(oid)?
.last()
.ok_or(RepositoryError::Doc(DocError::Missing))??;
Ok(root.into())
}
fn canonical_identity_head(&self) -> Result<Oid, RepositoryError> {
let blob = match self.backend.find_blob(self.id.deref().into()) {
Ok(blob) => blob,
-4
View File
@@ -365,10 +365,6 @@ impl<R: storage::ReadRepository> ReadRepository for DraftStore<'_, R> {
self.repo.identity_root()
}
fn identity_root_of(&self, remote: &RemoteId) -> Result<Oid, RepositoryError> {
self.repo.identity_root_of(remote)
}
fn canonical_identity_head(&self) -> Result<Oid, RepositoryError> {
self.repo.canonical_identity_head()
}
-4
View File
@@ -327,10 +327,6 @@ impl ReadRepository for MockRepository {
Ok(self.doc.commit)
}
fn identity_root_of(&self, _remote: &RemoteId) -> Result<Oid, RepositoryError> {
Ok(self.doc.commit)
}
fn canonical_identity_head(&self) -> Result<Oid, RepositoryError> {
Ok(self.doc.commit)
}