Expand description
Git operations for distributed AIDA.
Provides wrappers around git commands for:
- Node registration CAS (compare-and-swap) loop
- Committing object changes
- Push/pull synchronization
These operations shell out to the git CLI rather than using libgit2,
keeping the dependency light and behavior identical to what users see
when they run git manually.
Structs§
- GitResult
- Result of a git command execution.
Functions§
- add
- Stage specific files.
- add_all
- Stage all changes (tracked and untracked) in a subdirectory.
- commit
- Commit staged changes.
- configure_
user - Configure user name and email for commits (repo-local, not global).
- create_
store_ worktree - Create an orphan branch and worktree for the AIDA store.
- current_
branch - Get the current branch name.
- git_
config_ get - Get a git config value (checks local, then global).
- has_
changes - Check if the working tree has uncommitted changes.
- has_
worktree - Check if a worktree exists for the given directory.
- head_
sha - Get the current HEAD commit SHA (short form).
- init
- Initialize a new git repository.
- is_
git_ repo - Check if a directory is a git repository.
- is_
remote_ reachable - Check if the remote is reachable (can we push/pull?).
- merge_
gate - Commit and push all pending object changes in the aida repo. This is the “sync” operation — called when the user wants to share changes. Run the merge gate: assign agreed IDs to all objects that don’t have one.
- pull
- Pull (merge) from remote.
- pull_
rebase - Pull with rebase from remote.
- push
- Push to the remote. Returns true on success, false if rejected (non-fast-forward).
- register_
node - Register a new node in the aida registry via git CAS push loop.
- remove_
store_ worktree - Remove a store worktree and optionally delete the branch.
- sync_
objects