Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle/identity: Exact pattern for default branch
Lorenz Leutgeb committed 7 months ago
commit dcb39974eb51db8214787d94e3db87ba64cd9466
parent b7425da06cc20af24219c2b2e2fe9f1af1c3577b
1 file changed +1 -3
modified crates/radicle/src/identity/doc.rs
@@ -81,8 +81,6 @@ impl DocError {

#[derive(Debug, Error)]
pub enum DefaultBranchRuleError {
-
    #[error("could not create rule due to the reference name being invalid: {0}")]
-
    Pattern(#[from] rules::PatternError),
    #[error("could not load `xyz.radicle.project` to get default branch name: {0}")]
    Payload(#[from] PayloadError),
}
@@ -751,7 +749,7 @@ impl Doc {
    pub fn default_branch_rule(
        &self,
    ) -> Result<(rules::Pattern, rules::ValidRule), DefaultBranchRuleError> {
-
        let pattern = rules::Pattern::try_from(self.default_branch()?.to_owned())?;
+
        let pattern = rules::Pattern::exact(self.project()?.default_branch());
        let rule = rules::Rule::new(
            rules::ResolvedDelegates::Delegates(self.delegates.clone()),
            self.threshold,