Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW
✓ CI success Fintan Halpenny committed 7 months ago
commit ce4864fc46c4463b6aeabb79b0712bcaf9987bdf
parent 35ecb1cfa89e995313934817efeb719f89738888
1 passed (1 total) View logs
1 file changed +11 -7
modified crates/radicle/src/identity/doc.rs
@@ -765,16 +765,20 @@ impl Doc {
    }

    /// Construct the canonical references for this document.
+
    ///
    /// Starts by obtaining the payload identified by
    /// [`PayloadId::canonical_refs`], if it exists.
-
    /// Verifies that the rule for the default branch (if it exists) are
-
    /// compatible with, i.e. for [`rules::Allowed::Delegates`] and a thresold
+
    ///
+
    /// Verifies that the rule for the default branch – if it exists – is
+
    /// compatible, i.e. for [`rules::Allowed::Delegates`] and a threshold
    /// matching [`Self::threshold`].
-
    /// Falls back to synthesizing canonical references from the payload
-
    /// identified by [`PayloadId::project`], i.e. a rule exactly
-
    /// matching [`Project::default_branch`] that is compatible with self, and
-
    /// a symbolic reference with name `HEAD`
-
    /// (see [`symbolic::SymbolicRefs::head`]) that targets the same branch.
+
    ///
+
    /// If the payload is missing, it falls back to synthesizing canonical
+
    /// references from the payload identified by [`PayloadId::project`], i.e. a
+
    /// rule exactly matching [`Project::default_branch`] that is compatible
+
    /// with self, and a symbolic reference with name `HEAD` (see
+
    /// [`symbolic::SymbolicRefs::head`]) that targets the same branch.
+
    ///
    /// The resulting [`CanonicalRefs`] must pass validation, and there are
    /// cases where the payload is valid as such, but invalid in combination
    /// with the synthesized rule and symbolic reference. For example, if