Expand description
Git operations backed by git2, with session-scoped write safety.
Every public method returns a typed output struct wrapped in
anyhow::Result. The lds MCP layer serialises these structs with
serde_json::to_string_pretty so callers receive a stable JSON shape and
can access fields directly instead of parsing free-form text.
Read operations (status, log, diff, worktree_list, remote inspection) are
always available. Write operations (commit, merge, worktree add/remove,
branch delete, reset) require the target path / branch to have been
created — or formally adopted via GitModule::session_release — by the
current session.
Re-exports§
pub use output::BranchDeleteOutput;pub use output::BranchStatusOutput;pub use output::CommitEntry;pub use output::CommitOutput;pub use output::DiffOutput;pub use output::EntryStatus;pub use output::FetchOutput;pub use output::IsPushedOutput;pub use output::LogOutput;pub use output::MergeOutput;pub use output::OtherStagedMode;pub use output::RemoteEntry;pub use output::RemoteListOutput;pub use output::ResetMode;pub use output::ResetOutput;pub use output::SessionReleaseOutput;pub use output::StatusKind;pub use output::StatusOutput;pub use output::TagPushedOutput;pub use output::UnpushedCommitsOutput;pub use output::WorktreeAddOutput;pub use output::WorktreeEntry;pub use output::WorktreeListOutput;pub use output::WorktreeRemoveOutput;pub use output::WorktreeStateOutput;
Modules§
- output
- Typed return shapes for [
GitModule] methods.
Structs§
- GitModule
- Git module instance, tied to a
Session. - LogFilters
- Optional narrowing for
GitModule::log. All fields are AND-combined; an absent field imposes no constraint.