use-git-ref 0.0.1

Primitive Git ref vocabulary for RustUse
Documentation
  • Coverage
  • 100%
    40 out of 40 items documented1 out of 29 items with examples
  • Size
  • Source code size: 13.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 782.73 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-git
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-git-ref

Primitive Git ref vocabulary for RustUse.

use-git-ref models ref names, ref kinds, symbolic refs, and HEAD. It does not dereference refs or inspect repositories.

Basic usage

use use_git_ref::{GitHead, GitRefKind, GitRefName};

let name = GitRefName::new("refs/heads/main").expect("valid ref");
let head = GitHead::symbolic(name.clone());

assert_eq!(name.kind(), GitRefKind::Branch);
assert!(head.is_symbolic());

Scope

  • Recognize HEAD, refs/heads/*, refs/tags/*, and refs/remotes/* vocabulary.
  • Validate simple ref-name text.
  • Keep repository lookup and dereferencing out of scope.