Skip to main content

wt/git/
mod.rs

1//! The Git boundary (spec §4): `gix` for reads, the `git` CLI for mutations and
2//! network operations. Submodules:
3//!
4//! - [`cli`] — the [`GitCli`] subprocess trait + [`RealGit`].
5//! - `ops` — verb-named wrappers over [`GitCli`] for shared mutations.
6//! - [`discover`] — repository discovery and identity via `gix`.
7//! - [`porcelain`] — pure parsers for `git` porcelain output.
8//! - [`submodule`] — submodule detection (`status`) and init (`update --init`).
9//! - [`worktrees`] — worktree enumeration + missing detection.
10
11pub mod aheadbehind;
12pub mod cli;
13pub mod commit;
14pub mod discover;
15pub(crate) mod ops;
16pub mod porcelain;
17pub mod refs;
18pub mod status;
19pub mod submodule;
20pub mod worktrees;
21
22pub(crate) use aheadbehind::ahead_behind;
23pub use cli::{GitCli, GitOutput, RealGit};
24pub(crate) use commit::{CommitInfo, abbrev_len, commit_info, recent_commits};
25pub(crate) use refs::{
26    Upstream, branch_ref, default_branch, is_ancestor, local_branches, resolve_hex, upstream_of,
27    validate_branch_name,
28};
29// Only the command handlers reach for these; the core library does not.
30// `default_base_ref` moved here from the TUI group when `wt issue` (a CLI
31// command) started resolving its base from `origin/HEAD`.
32#[cfg(feature = "cli")]
33pub(crate) use refs::{all_branches, current_branch, default_base_ref, remote_branches};
34// Only the TUI reaches for this.
35#[cfg(feature = "tui")]
36pub(crate) use refs::origin_head_branch;
37pub(crate) use status::status_of;
38pub(crate) use worktrees::enumerate;