Skip to main content

Module git

Module git 

Source
Expand description

Git operations and repository management.

Re-exports§

pub use amendment::AmendmentHandler;
pub use commit::refine_message_scope;
pub use commit::resolve_scope;
pub use commit::CommitAnalysis;
pub use commit::CommitAnalysisForAI;
pub use commit::CommitInfo;
pub use commit::CommitInfoForAI;
pub use commit::FileDiffRef;
pub use diff_split::split_by_file;
pub use diff_split::split_file_by_hunk;
pub use diff_split::FileDiff;
pub use diff_split::HunkDiff;
pub use lint::lint_message;
pub use lint::parse_subject;
pub use lint::passes as lint_passes;
pub use lint::suggest_scope_fix;
pub use lint::ParsedSubject;
pub use main_branches::branches_containing;
pub use main_branches::detect_main_branch_tips;
pub use main_branches::MainBranchTip;
pub use remote::RemoteInfo;
pub use repository::GitRepository;

Modules§

amendment
Git commit amendment operations.
commit
Git commit operations and analysis.
diff_split
Per-file and per-hunk unified diff splitting.
lint
Deterministic, no-AI commit-message lint.
main_branches
Detection of remote main-branch tips and commit containment.
remote
Git remote operations.
repository
Git repository operations.
worktree_batch
Primitives shared by the batch-worktree git engines — worktree_rebase and worktree_push.
worktree_push
Batch-publish a repository’s worktrees to their upstreams, force-pushing with a lease where history was rewritten (issue #1443).
worktree_rebase
Batch-rebase a repository’s worktrees onto its remote default branch, fetching the remote exactly once per repository (issue #1400).

Constants§

FULL_HASH_LEN
Length of a full SHA-1 commit hash in hex characters.
SHORT_HASH_LEN
Number of hex characters to show in abbreviated commit hashes.

Functions§

resolve_git_binary
Resolves git, preferring [GIT_BIN_ENV], then the first existing well-known absolute path, then bare git on PATH.