pub async fn commit_all_preserving_single_commit(
repo_path: PathBuf,
base_branch: String,
commit_message: String,
message_strategy: SingleCommitMessageStrategy,
no_verify: bool,
) -> Result<(), GitError>Expand description
Re-exported commit/sync/diff APIs. Stages all changes and keeps a single commit for the provided message.
Creates a new commit when HEAD has no commits beyond base_branch.
Otherwise, amends HEAD so the branch keeps one evolving session commit.
§Arguments
repo_path- Path to the git repository or worktreebase_branch- Branch used to detect whether a session commit already exists onHEADcommit_message- Message that identifies the session commitmessage_strategy- Whether amends replace or reuse the existingHEADmessageno_verify- Whentrue, skips configured git hooks such asprek-managedpre-commitandcommit-msghooks (--no-verify)
§Returns
Ok(()) on success.
§Errors
Returns a GitError if staging, commit lookup, or committing changes
fails.