pub fn run_amend(
amendments_yaml: &str,
allow_pushed: bool,
repo_path: Option<&Path>,
) -> Result<AmendOutcome>Expand description
Non-interactive core for omni-dev git commit message amend.
The deterministic, apply-messages-from-YAML counterpart to
crate::cli::git::run_twiddle: unlike twiddle it makes no AI call, taking
the amendments verbatim. Shared with the MCP git_amend_commits tool, which
passes the amendments as an inline YAML string rather than a file path.
Runs the same preflight the CLI command does (repo present, working tree
clean), then applies the amendments via crate::git::AmendmentHandler,
which refuses commits already in a remote main branch unless allow_pushed
is set. repo_path selects the repository (None = current working
directory).