Vault git state and commits
State: open/building · Kind: module · Audience: system
Summary
Section titled “Summary”- Reports a vault’s git state (branch, ahead/behind, per-path changes) and performs the commits, reverts and pushes Polish makes to it.
- Domain logic over the typed git client. It builds no git argv and spawns no process of its own.
Statement
Section titled “Statement”determined-git answers what state a vault’s git repository is in, and applies the writes Polish makes to it. It refuses a vault that is not a repository before anything spawns. It maps easy-git’s status report onto the wire types of determined-core. It has no port trait, because git never had a Node implementation to toggle against.
The platform’s git routes call the async status and the vault functions. determined-polish calls
their synchronous *_at forms from its batch thread.
What it provides
Section titled “What it provides”- Async
statusfor the active vault, run off the executor thread withspawn_blocking. is_repoandcommit_block, which report whether the vault is a repository and what blocks a commit (merge, rebase, detached HEAD).commit_paths_atandcommit_all_at, which commit chosen paths or everything with a message.revert_at,has_upstreamandpush_atfor undoing a commit and publishing to the upstream.uncommitted_pathsandcommittable, which pick the paths Polish may commit.
Underlying implementation
Section titled “Underlying implementation”- solutions/determined/crates/determined-git/src/lib.rs
- solutions/determined/crates/determined-git/src/vault.rs
Locations
Section titled “Locations”solutions/determined/crates/determined-git/solutions/determined/crates/determined-git/src/lib.rs#statussolutions/determined/crates/determined-git/src/vault.rs#commit_paths_atsolutions/determined/crates/determined-git/src/vault.rs#revert_atsolutions/determined/crates/determined-git/src/vault.rs#push_at