Expand description
Git-operations slice for rtb-vcs v0.2 (the v0.5 framework
milestone).
§Foundation
This module ships the Repo type — a thin, async wrapper over
gix that downstream tools compose richer git-based behaviour
on top of. Per project memory: Repo is a foundation, not a
curated facade. v0.5 lays the vocabulary; v0.5.x and later add
capability without breaking the public surface.
§Backend
gix is the primary backend; gix::ThreadSafeRepository is
the storage type so Repo: Send + Sync and can be cloned freely
across tokio::spawn boundaries. Every public method wraps a
blocking gix call in tokio::task::spawn_blocking (per spec
§3.1 + A1 resolution).
git2 is an opt-in fallback for operations gix cannot yet do
(push, primarily). Gated on the git2-fallback Cargo feature.
§Auth
Auth-requiring methods (clone, fetch, push) take a
&CredentialRef (already declared by the host tool’s typed
config) and resolve through rtb_credentials::Resolver. See
crate::git::auth for the glue and the v0.5 scope spec §3.3 for
the rationale (A2 resolution — no parallel TokenSource trait).
§Error model
Backend errors are wrapped, not leaked (A8). See
RepoError for the variant table; the internal mapping lives
in crate::git::error.
Structs§
- Blame
- Blame result for a file at a revspec — one entry per line.
- Blame
Line - Per-line blame data for a single line of a file.
- Checkout
Options - Options for
Repo::checkout. - Clone
Options - Options for
Repo::clone. - Commit
Info - Per-commit data surfaced by
CommitWalk. - Commit
Walk - Async stream over the commits matched by a
Repo::walkcall. - Diff
- Structured diff between two tree-ish references.
- Fetch
Options - Options for
Repo::fetch. - File
Change - A single file-level change in a
Diff. - Init
Options - Options for
Repo::init. - Push
Options - Options for
Repo::push. - Repo
- A repository handle. Cheap to clone — every field is either
Arc-wrapped (the gix handle) or a small owned value. - Repo
Status - Working-tree status snapshot.
Enums§
- Change
Kind - What happened to a file between two tree-ish references.
- Repo
Error - Errors surfaced by every method on
crate::git::Repo.