use-git
use-git is a RustUse facade crate for primitive Git vocabulary: object identifiers, refs, branches, tags, remotes, refspecs, revision selectors, pathspecs, ignore patterns, attributes, and status metadata.
It is not a Git client, repository engine, command runner, or storage implementation. It provides small, composable types that other crates can use when they need to talk about Git concepts without taking on a full Git dependency.
What this crate provides
| Feature | Namespace | Focused crate | Purpose |
|---|---|---|---|
oid |
use_git::oid |
use-git-oid |
Object identifier and short object identifier primitives |
refs |
use_git::refs |
use-git-ref |
Ref names, ref kinds, symbolic refs, and HEAD vocabulary |
branch |
use_git::branch |
use-git-branch |
Local, remote-tracking, and default branch name primitives |
tag |
use_git::tag |
use-git-tag |
Tag names, tag kind vocabulary, and version-like tag wrappers |
remote |
use_git::remote |
use-git-remote |
Remote names, remote refs, and remote-tracking ref primitives |
refspec |
use_git::refspec |
use-git-refspec |
Fetch and push refspec syntax primitives |
revision |
use_git::revision |
use-git-revision |
Revision selectors, suffixes, and range vocabulary |
pathspec |
use_git::pathspec |
use-git-pathspec |
Pathspec patterns, magic labels, and scope vocabulary |
ignore |
use_git::ignore |
use-git-ignore |
Gitignore-style pattern and line classification vocabulary |
attribute |
use_git::attribute |
use-git-attribute |
Gitattributes pattern and attribute state vocabulary |
status |
use_git::status |
use-git-status |
Index, worktree, conflict, file-change, and porcelain status metadata |
Installation
[]
= "0.0.1"
Disable default features when you want a narrow facade surface:
[]
= { = "0.0.1", = false, = ["oid", "refs"] }
Basic usage
Scope
The facade only composes the focused vocabulary crates. It does not resolve, inspect, fetch, update, store, or compare repository data.
Non-goals
- No
Gitcommand execution. - No repository storage or object database access.
- No clone, fetch, pull, push, merge, rebase, checkout, or commit behavior.
- No packfile parsing.
- No history walking or diff computation.
- No dependency on
git2,gix,gitoxide, or libgit2 bindings.