Skip to main content

matches_grammar

Function matches_grammar 

Source
pub fn matches_grammar(branch: &str) -> bool
Expand description

Whether a branch name matches the landed grammar.

The same anchored language crate::landing::BRANCH_GRAMMAR states as an extended regular expression, hand-rolled here because the convention admits no regex dependency for one pattern. Necessary, not sufficient: it admits names git itself refuses, so rk worktree add follows it with git check-ref-format --branch.