Skip to main content

Module git_ops

Module git_ops 

Source
Expand description

Git operations for mission branches (plan §4.4 — git is the source of truth).

Every operation shells out to the git binary with an explicit argument vector (never a shell string, §9) and runs synchronously with the repo root as the working directory. Callers on async paths wrap calls in tokio::task::spawn_blocking.

All failures surface as EngineError::Git with the command context and whatever git printed, so mission logs show why a git step failed.

Structs§

AddedCommit
The commit that introduced a path, from GitRepo::commit_that_added.
CommitInfo
One commit in a GitRepo::commits_between listing.
GitRepo
Handle to a local git repository rooted at a working-tree directory.
KranzCommitMetadata
Mission facts attached to kranz-authored durable commits as git trailers.
TreeEntry
One entry of a recursive tree listing (GitRepo::ls_tree_recursive): the git file mode (100644/100755 regular blob, 120000 symlink, 160000 submodule commit), the object kind (blob/commit), the blob size in bytes (None for non-blobs), and the repo-relative path.

Enums§

CheckpointOutcome
Outcome of a scoped engine checkpoint commit (GitRepo::commit_dirty_paths).
MergeOutcome
Outcome of a GitRepo::merge_no_ff into the current branch (roadmap M3).

Functions§

kranz_commit_trailers
Append-only git trailers for mission attribution and actual cost.
with_kranz_trailers
Commit message with kranz trailers separated in the standard trailer block.