ralph/git/commit/mod.rs
1//! Git commit and push facade.
2//!
3//! Purpose:
4//! - Expose commit, restore, upstream, and rebase-aware push operations from a thin git module.
5//!
6//! Responsibilities:
7//! - Re-export working-tree mutation helpers.
8//! - Re-export upstream/query helpers and rebase-aware push behavior.
9//! - Keep tests and sub-concerns in focused companions.
10//!
11//! Scope:
12//! - Git commit/push workflows only.
13//! - Error types, status helpers, and branch lookup remain in sibling git modules.
14//!
15//! Usage:
16//! - Imported through `crate::git` by command workflows and tests.
17//!
18//! Invariants/assumptions:
19//! - Public APIs preserve existing behavior and error types.
20//! - Rebase-aware push remains the single entrypoint for retrying non-fast-forward pushes.
21
22mod rebase_push;
23#[cfg(test)]
24mod tests;
25mod upstream;
26mod working_tree;
27
28pub use rebase_push::push_upstream_with_rebase;
29pub use upstream::{
30 abort_rebase, fetch_branch, is_ahead_of_upstream, is_behind_upstream, list_conflict_files,
31 push_current_branch, push_head_to_branch, push_upstream, push_upstream_allow_create,
32 rebase_onto, upstream_ref,
33};
34pub use working_tree::{
35 add_paths_force, commit_all, restore_tracked_paths_to_head, revert_uncommitted,
36};