diff --git a/radicle/src/storage.rs b/radicle/src/storage.rs index e2eac4ae..cc54a187 100644 --- a/radicle/src/storage.rs +++ b/radicle/src/storage.rs @@ -244,8 +244,8 @@ pub trait ReadRepository { /// Get the head of this repository. /// - /// Returns the value of `HEAD` if it is set, otherwise computes the canonical head - /// using [`ReadRepository::canonical_head`]. + /// Returns the reference pointed to by `HEAD` if it is set. Otherwise, computes the canonical + /// head using [`ReadRepository::canonical_head`]. /// /// Returns the [`Oid`] as well as the qualified reference name. fn head(&self) -> Result<(Qualified, Oid), ProjectError>; diff --git a/radicle/src/storage/git.rs b/radicle/src/storage/git.rs index ac617e0f..e776283c 100644 --- a/radicle/src/storage/git.rs +++ b/radicle/src/storage/git.rs @@ -233,7 +233,7 @@ impl Repository { }) .collect::>()?; - for entry in self.public_references()? { + for entry in self.namespaced_references()? { let (remote_id, refname, oid) = entry?; let remote = remotes .get_mut(&remote_id) @@ -368,8 +368,8 @@ impl Repository { Ok(remotes) } - /// Return all references that are public, ie. that are replicated, verified and signed. - fn public_references( + /// Return all references that are namespaced, ie. that are signed by a node and verified. + fn namespaced_references( &self, ) -> Result>, git2::Error> { @@ -877,7 +877,7 @@ mod tests { } #[test] - fn test_public_references() { + fn test_namespaced_references() { let tmp = tempfile::tempdir().unwrap(); let signer = MockSigner::default(); let storage = Storage::open(tmp.path().join("storage")).unwrap(); @@ -886,7 +886,7 @@ mod tests { let proj = storage.repository(id).unwrap(); let mut refs = proj - .public_references() + .namespaced_references() .unwrap() .map(|r| r.unwrap()) .map(|(_, r, _)| r.to_string())