Skip to main content

commit_to_main

Function commit_to_main 

Source
pub fn commit_to_main(
    repo: &Path,
    worktree: &Path,
    intent: &str,
    contract: &OutcomeContract,
    provenance: Option<&str>,
) -> Result<String, String>
Expand description

Deliver to a managed project’s main. The worktree was checked out detached at main’s tip, so its commit is a direct descendant — a fast-forward updates both the main ref and the project’s checkout. ff-only: if main moved since the session started (something committed underneath us), this errors instead of rebasing or forcing, preserving the guarantee that the diff the user approved is exactly what lands. Returns the commit SHA.