rskit-git — Git Integration
Composable git repository interfaces backed by libgit2 and the git CLI.
Features
- Capability traits for reads, writes, refs, remotes, config, and maintenance.
- Embedded
git2backend for repository operations. GitClibackend for command-oriented workflows using argv-only subprocess execution.- Typed
GitErrorvariants converted intoAppErrorfor consistent rskit error handling.
Cargo features
vendored-openssl(off by default): statically link a source-built OpenSSL into the embeddedgit2backend instead of resolving one from the host. The default builds against the system OpenSSL so it stays on the platform's security updates; opt in for portable or cross-compiled release builds where a target OpenSSL is not available.testutil(off by default): expose the in-crate test helpers.
Usage
[]
= "0.2.0-alpha.4"
use ;
let repo = open?;
let dirty = repo.is_dirty?;
let status = repo.status?;
# Ok::
The CLI backend builds commands with ProcessSpec::new("git").args(...) and sets GIT_TERMINAL_PROMPT=0 to avoid interactive credential prompts in automation. Command failures preserve argv, exit code, stdout/stderr, and truncation metadata.