sley 0.0.2

Ergonomic facade over the sley engine, a native-Rust reimplementation of Git's plumbing.
Documentation

git — the ergonomic facade over the sley engine.

Downstream code that wants a "just open a repository and read things" entry point should reach for [Repository] rather than wiring the plumbing crates together by hand. A [Repository] is a lightweight handle around a resolved git directory: it remembers the git_dir, the common directory (for linked worktrees), and the repository's object format, and hands back the underlying plumbing objects ([sley_odb::FileObjectDatabase], [sley_refs::FileRefStore], [sley_config::GitConfig]) on demand.

Heddle / embedder surface (feature remote, on by default):

  • [Repository::config_snapshot] — full git config with include / includeIf / hasconfig: resolution.
  • [Repository::init_mirror] — bare mirror defaults (+refs/*:refs/*, mirror = true on origin).
  • [Repository::copy_reachable_from] — pack-based object transfer.
  • [Repository::remote] / [remote::RemoteContext] — URL rewriting and [sley_remote] fetch/push/clone/ls-remote orchestration (HTTP v2 fetch, SSH, bundle fetch, thin-pack push).
  • [notes] — git notes read/write for round-trip fidelity.
  • [Repository::capabilities] / [Repository::transport_capabilities] — capability probes before calling in.

For power users the engine crates are re-exported under [plumbing] (and the most common types are re-exported at the crate root), so a single git = { path = ... } dependency is enough to reach the whole stack.

use sley::Repository;

# fn main() -> sley::Result<()> {
let repo = Repository::discover(".")?;
let head = repo.head()?;
if let Some(oid) = head.oid {
    let commit = repo.read_commit(&oid)?;
    let _ = commit.tree;
}
# Ok(())
# }