Expand description
§use-git-pathspec
Primitive Git pathspec vocabulary for RustUse.
use-git-pathspec models pathspec strings and common magic labels such as top, literal, glob, icase, and exclude. It does not traverse the filesystem or match paths.
§Basic usage
use use_git_pathspec::{GitPathspec, PathspecMagic};
let pathspec = GitPathspec::new(":(top,literal)README.md").expect("valid pathspec");
assert!(pathspec.has_magic(PathspecMagic::Top));
assert!(pathspec.has_magic(PathspecMagic::Literal));§Scope
- Wrap pathspec text and expose descriptive magic vocabulary.
- Keep filesystem traversal and glob evaluation out of scope.
Structs§
- GitPathspec
- A lightweight pathspec wrapper.
- Pathspec
Pattern - A pathspec pattern string.
Enums§
- Pathspec
Magic - Common pathspec magic labels.
- Pathspec
Parse Error - Error returned while parsing pathspec vocabulary.
- Pathspec
Scope - Pathspec scope vocabulary.