Expand description
Pure git data layer — read + write operations over a git repository.
Wraps [gix] for repository interaction, providing a typed API surface
consumed by the VCS subsystem (lattice-host::vcs) and the magit feature
buffer modes (lattice-magit).
Zero lattice-* dependencies. Only gix, ropey, smallvec, thiserror.
§Example
use lattice_vcs::{Repository, WorkingTree};
let repo = Repository::discover(".").unwrap();
let statuses = WorkingTree::statuses(&repo).unwrap();
for (path, status) in statuses {
println!("{}: {:?}", path.display(), status);
}Structs§
- Bisect
- Bisect operations — start, good, bad, skip, reset, and reading the state of a bisect already in progress.
- Bisect
State - A bisect in progress.
- Branch
- Branch operations — checkout, create, delete.
- Commit
- Commit operations — create and amend commits.
- GitBlob
- Read the content of a git blob (file at a specific revision).
- Index
- Index (staging area) write operations.
- Note
- Git-notes operations.
- Path
Change - A path’s porcelain
XYstatus, kept as the TWO independent axes git reports rather than collapsed into one value. - RefEntry
- One ref, and where it points.
- Reference
- Reference operations — resolve a named ref to an object id.
- Remote
- Remote management — list, add, rename, remove, set-url, prune.
- Remote
Entry - A single configured remote.
- Repository
- Wraps a [
gix::Repository], representing an open git repository. - Stash
- Stash operations — list, apply, pop, drop, create.
- Submodule
- Submodule operations — list, add, update, sync, remove.
- Submodule
Entry - One configured submodule.
- Working
Tree - Working tree and index status operations.
Enums§
- Bisect
Step - NC.6: what one bisect step did, read from git’s own report.
- InFlight
Op - A multi-commit operation stopped mid-flight.
- Note
Merge Strategy - How
git notes mergeresolves a conflict. Magit offers the same set, which is git’s own. - Path
Status - One axis of a path’s change, as git reports it.
- RefKind
- What kind of thing a ref is. The three groups magit’s refs buffer shows, in the order it shows them.
- Submodule
State - What
git submodule statusreports about one submodule. - Unmerged
Kind - Which unmerged combination git reported.
- VcsError
- Error type for all
lattice-vcsoperations.
Functions§
- parse_
bisect_ step - Parse the stdout of
git bisect start|good|bad|skip. - parse_
bisect_ vars - Parse
git rev-list --bisect-varsoutput into(revisions_left, steps). - parse_
for_ each_ ref - Parse [
REF_FORMAT] output into entries. - parse_
remote_ v - Parse the output of
git remote -v. - parse_
submodule_ status - Parse
git submodule statusoutput.
Type Aliases§
- Result
- Convenience result type alias.