Skip to main content

Crate gonzalo_store_git

Crate gonzalo_store_git 

Source
Expand description

Git-backed storage substrate. Each record is a JSON file in a git worktree; every write is committed, giving an auditable history. Remote replication via fast-forward pull/push.

GitStore implements Store but not BlobStore: git is not a natural content-addressed blob store. Blob-backed records (e.g. checkpoint pre-images, code-graph slices) therefore require the fs, s3, or remote (daemon) substrates, not git (gonzalo#184).

Structs§

ChangedPaths
Source paths that changed between a git base commit and the current working tree, classified uniformly as added / modified / deleted. Paths are repo-relative with / separators and each vector is sorted.
GitStore
PullConflict
A record that diverged on both sides of a pull and could not be auto-merged; the local version is kept and both sides are surfaced for resolution.
PullReport
What a GitStore::pull did.

Functions§

changed_paths
Compute the changed path set between the tree of commit base and the current working tree of the repo at root. Untracked files count as additions; renames are surfaced as a delete of the old path plus an add of the new one (uniform A/M/D — no rename tracking). Paths are repo-relative, /-separated, and sorted.
head_commit
Resolve the HEAD of the repo at root to its commit SHA (hex). This is the value to record as the base after a successful index, so the next run can diff against it incrementally.
is_git_repo
True if path is inside a git working tree (has a discoverable repository).