Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/edda

crates/nornir-git/src/lib.rs

//! # nornir-git
//!
//! Pure-Rust git helpers over [`gix`] (gitoxide) — the single home for git
//! inspection and history rewriting so a tool never shells out to the `git`
//! binary and never links libgit2/C. The airgap-clean git leaf lifted out of
//! nornir (it depends on nothing but `gix` + `anyhow`, so it drags no warehouse /
//! embedder / server deps behind it).
//!
//! **Two halves, one feature.** `porcelain` (ON by default) is gix — `gitio`,
//! `gitops`, `gitclean`, `fleet`. With it OFF what remains is the SSH transport
//! — [`ssh`], [`sshkey`], [`deploykey`] — which is russh + ssh-key and links no
//! gix at all. See `Cargo.toml`'s feature block for the measurement.
//!
//! - `gitio` (`porcelain`) — read-side inspection + the small write helpers
//!   (`init`, `commit_all`, tags, tree/blob walk, fetch).
//! - `fleet` (`porcelain`) — WHICH REF IS EACH CHECKOUT AT: one row per checkout under a
//!   root (dirty · behind · ahead · at-risk), so "är allt commitat och pushat?"
//!   has a Rust answer instead of a shell script no verb dispatches to.
//! - `gitclean` (`porcelain`) — the pure-Rust analogue of
//!   `git filter-repo --invert-paths --path <p>`: remove one or more paths (e.g.
//!   a committed `docs/book.pdf`) from **every** commit's history.
//! - [`sshkey`] — mint the ed25519 **OpenSSH deploy key** the SSH transport
//!   ([`ssh`]) authenticates with. The ONE canonical key-gen (nornir + dwarves
//!   used to twin it); pure-Rust, no `ssh-keygen` subprocess.
//! - [`deploykey`] — WHERE that key is (one ladder, every rung reported), WHICH
//!   rung answered, and WHETHER a remote accepts it. [`deploykey::ssh_key_path`]
//!   is THE resolver; `gitio::nornir_ssh_key_path` delegates to it, so the
//!   surface that shows you the key shows the key the fetch uses.
//!
//! nornir re-exports both modules as `nornir::gitio` / `nornir::gitclean`, so its
//! existing `crate::gitio::…` call sites resolve unchanged.

// ── the two halves, and the feature between them ────────────────────────────
//
// Everything above `ssh` is the PORCELAIN and is gix. Everything below it is
// the TRANSPORT and is russh + ssh-key. See `Cargo.toml`'s `[features]` block
// for why the seam is a feature rather than a second crate; the short version
// is that a caller who only wants an authenticated `git-receive-pack` channel
// (gunnar's §11.1 appliance replication) should not link ~57 `gix-*` crates and
// the reqwest/rustls/icu tail to get one.

/// The gix porcelain: history, worktrees, fetch negotiation.
#[cfg(feature = "porcelain")]
pub mod fleet;
/// The gix porcelain: history rewriting.
#[cfg(feature = "porcelain")]
pub mod gitclean;
/// The gix porcelain: read-side inspection and the small write helpers.
#[cfg(feature = "porcelain")]
pub mod gitio;
/// The gix porcelain: ref/commit operations over an open repository.
#[cfg(feature = "porcelain")]
pub mod gitops;

// The transport half — no gix, with or without the feature.
pub mod deploykey;
pub mod selftest;
pub mod ssh;
pub mod sshkey;