Skip to content

vox-git API Reference (generated)

Crate: vox-git · Version: 0.6.0 · Target: Library (lib.rs)

Pure-Rust Git bridge for Vox — bidirectional sync using gix (no C, no libgit2)

vox-git — Pure-Rust Git bridge for Vox.

Uses gix (gitoxide) for all Git operations. No C, no libgit2.

vox-orchestrator
│
▼
GitBridge (this crate)
│
├── gix::Repository ── local .git/
│
└── GitForgeProvider ──► GitHub (via `vox-forge`; GitLab deprecated)
  • No C: gix only. Never git2 (which wraps libgit2).
  • Pure Rust TLS: reqwest with rustls-tls feature.
  • Forge-agnostic: git operations here; platform API calls go to vox-forge.
FeatureDefault / Enables
default—
DependencyKind
vox-bounded-fsNormal
ModuleDescription
bridgeHigh-level repository operations using gitoxide.
objectGit object id / OID helpers.
read_cmdAudited read-only raw-git invocations (unified diffs / numstat).
refsReference (branch/tag) utilities.
Dependency Topology, diagram 111 nodes, 10 edges: vox-git → vox-bounded-fs; vox-cli → vox-git; vox-cli-ci → vox-git; vox-cli-research → vox-git; vox-cli-review → vox-git; vox-config → vox-git; vox-effort-audit → vox-git; vox-effort-route → vox-git; vox-gui → vox-git; vox-ml-cli → vox-gitvox-gitvox-bounded-fsvox-clivox-cli-civox-cli-researchvox-cli-reviewvox-configvox-effort-auditvox-effort-routevox-guivox-ml-cli
Diagram source
graph {
direction: right
node vox_git: "vox-git"
node vox_bounded_fs: "vox-bounded-fs"
vox_git -> vox_bounded_fs
node vox_cli: "vox-cli"
vox_cli -> vox_git
node vox_cli_ci: "vox-cli-ci"
vox_cli_ci -> vox_git
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_git
node vox_cli_review: "vox-cli-review"
vox_cli_review -> vox_git
node vox_config: "vox-config"
vox_config -> vox_git
node vox_effort_audit: "vox-effort-audit"
vox_effort_audit -> vox_git
node vox_effort_route: "vox-effort-route"
vox_effort_route -> vox_git
node vox_gui: "vox-gui"
vox_gui -> vox_git
node vox_ml_cli: "vox-ml-cli"
vox_ml_cli -> vox_git
}
Consumer CrateRole
vox-cliDirect workspace dependent
vox-cli-ciDirect workspace dependent
vox-cli-researchDirect workspace dependent
vox-cli-reviewDirect workspace dependent
vox-configDirect workspace dependent
vox-effort-auditDirect workspace dependent
vox-effort-routeDirect workspace dependent
vox-guiDirect workspace dependent
vox-ml-cliDirect workspace dependent
KindSymbolSignatureSourceDescription
structbridge::SyncStatuspub struct SyncStatuscrates/vox-git/src/bridge.rs#L21-L32Current sync status between local and remote.
structbridge::SyncStatusRefpub struct SyncStatusRefcrates/vox-git/src/bridge.rs#L36-L42One ref’s sync status.
structbridge::GitBridgeConfigpub struct GitBridgeConfigcrates/vox-git/src/bridge.rs#L135-L146Configuration for a GitBridge instance.
structbridge::GitBridgepub struct GitBridgecrates/vox-git/src/bridge.rs#L165-L167High-level Git bridge. Wraps a local gix::Repository and exposes Vox-native Git operations. All gix types are confined to the method bodies below.
fnbridge::openpub fn open(repo_path: impl AsRef<Path>) -> Result<Self>crates/vox-git/src/bridge.rs#L171-L187Open an existing Git repository at the given path.
fnbridge::initpub fn init(repo_path: impl AsRef<Path>) -> Result<Self>crates/vox-git/src/bridge.rs#L190-L212Initialize a new Git repository at the given path.
fnbridge::head_commit_idpub fn head_commit_id(&self) -> Result<Option<ObjectId>>crates/vox-git/src/bridge.rs#L215-L238Get the current HEAD commit ID.
fnbridge::local_branchespub fn local_branches(&self) -> Result<Vec<RefName>>crates/vox-git/src/bridge.rs#L241-L256List local branch names.
fnbridge::sync_statuspub fn sync_status(&self) -> Result<SyncStatus>crates/vox-git/src/bridge.rs#L259-L305Get sync status vs the configured remote.
fnbridge::read_refpub fn read_ref(&self, ref_name: &RefName) -> Result<Option<ObjectId>>crates/vox-git/src/bridge.rs#L308-L321Read a ref to its target commit ID.
fnbridge::remote_urlpub fn remote_url(&self) -> Result<String>crates/vox-git/src/bridge.rs#L362-L385Get the URL of the configured remote.
fnbridge::repo_pathpub fn repo_path(&self) -> &Pathcrates/vox-git/src/bridge.rs#L388-L390Repository path.
fnbridge::config_mutpub fn config_mut(&mut self) -> &mut GitBridgeConfigcrates/vox-git/src/bridge.rs#L393-L395Mutable access to config (e.g., to change remote or branch).
structobject::ObjectIdpub struct ObjectId(pub String)crates/vox-git/src/object.rs#L11A Git object ID (SHA-1 or SHA-256 hash, hex-encoded).
fnobject::parsepub fn parse(hex: impl Into<String>) -> Option<Self>crates/vox-git/src/object.rs#L15-L22Parse a hex string into an ObjectId. Returns None if invalid.
fnobject::shortpub fn short(&self) -> &strcrates/vox-git/src/object.rs#L25-L27Short (7-char) display for human output.
fnobject::as_strpub fn as_str(&self) -> &strcrates/vox-git/src/object.rs#L30-L32Full hex string.
enumobject::ObjectKindpub enum ObjectKindcrates/vox-git/src/object.rs#L43-L48The kind of Git object.
structobject::GitCommitpub struct GitCommitcrates/vox-git/src/object.rs#L52-L71A Git commit (Vox-native representation).
fnobject::summarypub fn summary(&self) -> &strcrates/vox-git/src/object.rs#L75-L77One-line summary (first line of message).
fnobject::is_mergepub fn is_merge(&self) -> boolcrates/vox-git/src/object.rs#L80-L82True if this is a merge commit (>1 parent).
structobject::TreeEntrypub struct TreeEntrycrates/vox-git/src/object.rs#L87-L96A Git tree entry.
enumread_cmd::GitReadErrorpub enum GitReadErrorcrates/vox-git/src/read_cmd.rs#L27-L42Failure modes for [read_only].
fnread_cmd::read_onlypub fn read_only(repo: &Path, args: &[&str]) -> Result<String, GitReadError>crates/vox-git/src/read_cmd.rs#L51-L68Run git -C <repo> <args...> for a read-only subcommand, returning stdout (lossy UTF-8). Rejects any subcommand not in READ_ONLY (defense against accidental writes). The output is byte-for-byte the stdout of the underlying git process, so callers feeding diffs to an LLM judge/router see identical context to a direct invocation.
structrefs::RefNamepub struct RefName(pub String)crates/vox-git/src/refs.rs#L11A fully-qualified Git ref name (e.g., refs/heads/main).
fnrefs::newpub fn new(name: impl Into<String>) -> Selfcrates/vox-git/src/refs.rs#L15-L17Create from a string.
fnrefs::branchpub fn branch(name: &str) -> Selfcrates/vox-git/src/refs.rs#L20-L22refs/heads/<branch> shortcut.
fnrefs::tagpub fn tag(name: &str) -> Selfcrates/vox-git/src/refs.rs#L25-L27refs/tags/<tag> shortcut.
fnrefs::remote_trackingpub fn remote_tracking(remote: &str, branch: &str) -> Selfcrates/vox-git/src/refs.rs#L30-L32refs/remotes/<remote>/<branch> shortcut.
fnrefs::as_branch_namepub fn as_branch_name(&self) -> Option<&str>crates/vox-git/src/refs.rs#L35-L37Extract branch name from refs/heads/….
fnrefs::as_tag_namepub fn as_tag_name(&self) -> Option<&str>crates/vox-git/src/refs.rs#L40-L42Extract tag name from refs/tags/….
fnrefs::as_strpub fn as_str(&self) -> &strcrates/vox-git/src/refs.rs#L45-L47Raw ref string.
structrefs::ResolvedRefpub struct ResolvedRefcrates/vox-git/src/refs.rs#L58-L63A resolved Git ref — a ref name bound to an object ID.
structrefs::RemoteRefpub struct RemoteRefcrates/vox-git/src/refs.rs#L67-L74A remote bookmark — mirrors a remote’s current ref state.
structrefs::RefDiffpub struct RefDiffcrates/vox-git/src/refs.rs#L78-L83Diff between local and remote refs — used by sync to determine what to push/fetch.
enumrefs::RefStatuspub enum RefStatuscrates/vox-git/src/refs.rs#L87-L100Status of a ref relative to its remote counterpart.