Expand description
§use-git-refspec
Primitive Git refspec vocabulary for RustUse.
use-git-refspec models fetch and push refspec syntax. It can split simple [+]<source>:<destination> text, but it does not contact remotes or update refs.
§Basic usage
use use_git_refspec::{GitRefspec, RefspecMode};
let spec: GitRefspec = "+refs/heads/*:refs/remotes/origin/*".parse().expect("valid refspec");
assert_eq!(spec.mode(), RefspecMode::Force);
assert!(spec.is_wildcard());§Scope
- Model fetch vs push vocabulary.
- Model optional force and wildcard refspec labels.
- Keep remote operations out of scope.
Structs§
- GitRefspec
- A lightweight refspec model.
- Refspec
Destination - Refspec destination text.
- Refspec
Source - Refspec source text.
Enums§
- Refspec
Direction - Refspec direction vocabulary.
- Refspec
Mode - Refspec force mode vocabulary.
- Refspec
Parse Error - Error returned while parsing refspec vocabulary.