Skip to main content

commit_all

Function commit_all 

Source
pub async fn commit_all(repo_dir: &Path, message: &str) -> Result<bool>
Expand description

Stage modified/deleted tracked files and commit them with the given message.

Used to preserve agent work (e.g. fixer edits) that wasn’t committed before the rebase step. Uses git add -u (tracked files only) rather than git add -A to avoid committing untracked artifacts like temp files or test output.

Checks for tracked changes with -uno (ignore untracked) so that worktrees with only untracked files don’t trigger a commit attempt that would fail.

Returns Ok(true) if a commit was created, Ok(false) if there was nothing to commit.