pub fn derive(root: &Path) -> ScopeVocabularyExpand description
Learn the vocabulary from the repository’s own history.
Never fails: a directory that is not a work tree, a repository with no commits and a
missing git all yield an empty vocabulary that says why.
use majordomus_cli::commit::scopes::derive;
// a directory that is not a work tree yields an empty vocabulary that says why,
// never an empty one that looks like a repository with no conventions
let plain = tempfile::tempdir().expect("a temporary directory");
let v = derive(plain.path());
assert!(v.scopes.is_empty());
assert!(v.unavailable.is_some());