Rename Id to RepoId

Rename the type to make it clearer and consistent with `NodeId`.
This commit is contained in:
cloudhead
2024-01-22 15:51:44 +01:00
parent 7208d89c31
commit f87dfba9cd
78 changed files with 472 additions and 457 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ use radicle::crypto::ssh;
use radicle::git;
use radicle::git::raw as git2;
use radicle::git::{Version, VERSION_REQUIRED};
use radicle::prelude::{Id, NodeId};
use radicle::prelude::{NodeId, RepoId};
use radicle::storage::git::transport;
pub use radicle::git::raw::{
@@ -260,7 +260,7 @@ pub fn is_remote(repo: &git2::Repository, alias: &str) -> anyhow::Result<bool> {
}
/// Get the repository's "rad" remote.
pub fn rad_remote(repo: &Repository) -> anyhow::Result<(git2::Remote, Id)> {
pub fn rad_remote(repo: &Repository) -> anyhow::Result<(git2::Remote, RepoId)> {
match radicle::rad::remote(repo) {
Ok((remote, id)) => Ok((remote, id)),
Err(radicle::rad::RemoteError::NotFound(_)) => Err(anyhow!(
@@ -270,7 +270,7 @@ pub fn rad_remote(repo: &Repository) -> anyhow::Result<(git2::Remote, Id)> {
}
}
pub fn remove_remote(repo: &Repository, rid: &Id) -> anyhow::Result<()> {
pub fn remove_remote(repo: &Repository, rid: &RepoId) -> anyhow::Result<()> {
// N.b. ensure that we are removing the remote for the correct RID
match radicle::rad::remote(repo) {
Ok((_, rid_)) => {