ralph_workflow/git_helpers/
mod.rs

1//! Git Helper Functions
2//!
3//! Provides git hooks management, a git wrapper for blocking commits during the
4//! agent phase, and basic repository utilities.
5//!
6//! # Module Structure
7//!
8//! - [`hooks`] - Git hooks installation and removal
9//! - [`identity`] - Git identity resolution with comprehensive fallback chain
10//! - [`repo`] - Basic git repository operations (add, commit, snapshot)
11//! - [`start_commit`] - Starting commit tracking for incremental diffs
12//! - [`wrapper`] - Agent phase git wrapper for safe concurrent execution
13//! - [`branch`] - Branch detection and default branch resolution
14//! - Rebase operations are provided via the `rebase` module functions
15
16#![deny(unsafe_code)]
17
18pub mod branch;
19mod hooks;
20pub mod identity;
21mod rebase;
22mod repo;
23mod start_commit;
24mod wrapper;
25
26pub use branch::{get_default_branch, is_main_or_master_branch};
27pub use hooks::uninstall_hooks;
28pub use rebase::{
29    abort_rebase, continue_rebase, get_conflict_markers_for_file, get_conflicted_files,
30    rebase_onto, RebaseResult,
31};
32pub use repo::{
33    get_git_diff_from_start, get_repo_root, git_add_all, git_commit, git_diff, git_snapshot,
34    require_git_repo, validate_and_truncate_diff, CommitResultFallback,
35};
36pub use start_commit::{reset_start_commit, save_start_commit};
37pub use wrapper::{
38    cleanup_agent_phase_silent, cleanup_orphaned_marker, disable_git_wrapper, end_agent_phase,
39    start_agent_phase, GitHelpers,
40};
41
42#[cfg(test)]
43mod tests;