Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: avoid using `oid` as name
Lorenz Leutgeb committed 10 months ago
commit e8b69e86ca9701f1990193a26e1db6b124dd2135
parent 6f78ab9ce592ba42c9a6e7a689a663e1d6718296
1 file changed +18 -8
modified crates/radicle-remote-helper/src/push/error.rs
@@ -54,40 +54,50 @@ impl Canonical {
        Self::HeadsDiverge(HeadsDiverge { head, canonical })
    }

-
    pub fn missing_commit(repo: PathBuf, did: Did, oid: git::Oid, source: git::raw::Error) -> Self {
+
    pub fn missing_commit(
+
        repo: PathBuf,
+
        did: Did,
+
        commit: git::Oid,
+
        source: git::raw::Error,
+
    ) -> Self {
        Self::MissingCommit(MissingCommit {
            repo,
            did,
-
            oid,
+
            commit,
            source,
        })
    }

-
    pub fn invalid_commit(repo: PathBuf, did: Did, oid: git::Oid, source: git::raw::Error) -> Self {
+
    pub fn invalid_commit(
+
        repo: PathBuf,
+
        did: Did,
+
        commit: git::Oid,
+
        source: git::raw::Error,
+
    ) -> Self {
        Self::InvalidCommit(InvalidCommit {
            repo,
            did,
-
            oid,
+
            commit,
            source,
        })
    }
}

#[derive(Debug, Error)]
-
#[error("the commit {oid} for {did} is missing from the repository {repo:?}")]
+
#[error("the commit {commit} for {did} is missing from the repository {repo:?}")]
pub struct MissingCommit {
    repo: PathBuf,
    did: Did,
-
    oid: git::Oid,
+
    commit: git::Oid,
    source: git::raw::Error,
}

#[derive(Debug, Error)]
-
#[error("could not determine the commit {oid} for {did} is part of the repository {repo:?}")]
+
#[error("could not determine the commit {commit} for {did} is part of the repository {repo:?}")]
pub struct InvalidCommit {
    repo: PathBuf,
    did: Did,
-
    oid: git::Oid,
+
    commit: git::Oid,
    source: git::raw::Error,
}