Skip to main content

commit

Function commit 

Source
pub fn commit(worktree: &Path, message: &str, author: &ActorId) -> Result<()>
Expand description

Commits the staged change inside the worktree, as the agent that wrote it.

The identity is set on the command rather than read from git config, for two reasons. A change an agent wrote should not be attributed to whichever human happened to start the run — the audit trail is the product. And a run that has already done all its work should not be thrown away at the last step because the machine has no user.email configured, which is the ordinary state of a CI runner.

Committing is as far as a run goes. Merging is a separate, human-initiated act: an approved change is ready to merge, not already merged.