Skip to content

Vault git state and commits

State: open/building · Kind: module · Audience: system

  • 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.

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.

  • Async status for the active vault, run off the executor thread with spawn_blocking.
  • is_repo and commit_block, which report whether the vault is a repository and what blocks a commit (merge, rebase, detached HEAD).
  • commit_paths_at and commit_all_at, which commit chosen paths or everything with a message.
  • revert_at, has_upstream and push_at for undoing a commit and publishing to the upstream.
  • uncommitted_paths and committable, which pick the paths Polish may commit.
  • solutions/determined/crates/determined-git/src/lib.rs
  • solutions/determined/crates/determined-git/src/vault.rs
  • solutions/determined/crates/determined-git/
  • solutions/determined/crates/determined-git/src/lib.rs#status
  • solutions/determined/crates/determined-git/src/vault.rs#commit_paths_at
  • solutions/determined/crates/determined-git/src/vault.rs#revert_at
  • solutions/determined/crates/determined-git/src/vault.rs#push_at

← Back to Capabilities