Skip to main content

lattice_vcs/
lib.rs

1//! Pure git data layer — read + write operations over a git repository.
2//!
3//! Wraps [`gix`] for repository interaction, providing a typed API surface
4//! consumed by the VCS subsystem (`lattice-host::vcs`) and the magit feature
5//! buffer modes (`lattice-magit`).
6//!
7//! Zero `lattice-*` dependencies. Only `gix`, `ropey`, `smallvec`, `thiserror`.
8//!
9//! # Example
10//!
11//! ```no_run
12//! use lattice_vcs::{Repository, WorkingTree};
13//!
14//! let repo = Repository::discover(".").unwrap();
15//! let statuses = WorkingTree::statuses(&repo).unwrap();
16//! for (path, status) in statuses {
17//!     println!("{}: {:?}", path.display(), status);
18//! }
19//! ```
20
21#![deny(unsafe_code)]
22
23mod bisect;
24mod blob;
25mod branch;
26mod commit;
27mod error;
28mod in_flight;
29mod index;
30mod note;
31mod reference;
32mod remote;
33mod repository;
34mod stash;
35mod submodule;
36mod working_tree;
37
38pub use bisect::{Bisect, BisectState, BisectStep, parse_bisect_step, parse_bisect_vars};
39pub use blob::GitBlob;
40pub use branch::Branch;
41pub use commit::Commit;
42pub use error::{Result, VcsError};
43pub use in_flight::InFlightOp;
44pub use index::Index;
45pub use note::{Note, NoteMergeStrategy};
46pub use reference::{RefEntry, RefKind, Reference, parse_for_each_ref};
47pub use remote::{Remote, RemoteEntry, parse_remote_v};
48pub use repository::Repository;
49pub use stash::Stash;
50pub use submodule::{Submodule, SubmoduleEntry, SubmoduleState, parse_submodule_status};
51pub use working_tree::{PathChange, PathStatus, UnmergedKind, WorkingTree};