Repository navigation
v0.4.0
v0.4.0 — what changed since v0.3.99
The headline of this release is a complete, embedder-facing Git network transport stack in grit_lib: grit can now fetch and push over git://, ssh, http(s), and local/file:// remotes entirely in-process — no git subprocess on the wire — so tools like jj and GitButler can in theory drop a dependency on an external binary.
Network transports (grit_lib)
A new transport / fetch / push / credentials surface, lifted from grit's CLI internals into reusable, embedder-shaped APIs behind a Transport trait:
- All four transports, both directions — fetch and push over
git://,ssh,http(s), andfile://. - Git protocol v2 for fetch (over streaming transports and stateless smart-HTTP), with transparent downgrade to v0/v1; v0/v1 for push.
- Pluggable HTTP client (
HttpClienttrait; defaultureqimpl behind thehttp-ureqfeature) so embedders aren't forced onto a particular HTTP/TLS stack. - Credentials — a
CredentialProvidertrait plus a Git-compatible default that runs configuredcredential.helperprograms, filled on a401and retried as Basic, with typed non-interactive failure (never a TTY prompt/hang). - Capabilities: wildcard + exact refspecs, tag policies,
--prune, shallow/depth (deepen/shallow-since/deepen-not/--unshallow), force-with-lease (CAS + expect-absent), push-options,http.proxy/cookieFile/extraHeader, and negotiation-driven delta/thin packs (so a push never packs the whole object graph). - SHA-256 threaded through the transport and pack paths.
Backed by ~22 integration suites against real fixtures (system git daemon, fake-ssh, an in-tree HTTP server), cross-checked against system git + git fsck, including adversarial protocol-v2/HTTP suites (wire-evidence + mutation testing) and a negotiated-pack-size guard.
New examples
gritx-fetch and gritx-push (in grit-examples) discover a repository's default remote, infer the transport and authentication from its URL (credential helpers for HTTP, SSH keys/agent for SSH, none for git:///local), and run the operation in-process.
Also in this release
- Full SHA-256 support across all operations (read + write).
- Licensing:
grit-cliis now GPL-2.0-only andgrit-libis MIT. - Performance: cached MIDX reads and delta bases, gitattributes/config-cascade caching with stat-stamp revalidation, faster
ls-filesand tree-diff. - A
grit-benchtool for benchmarking grit vs git at scale, and a mailmap.
Crates
Published to crates.io at 0.4.0: grit-lib, grit-protocol, grit-simple, grit-cli.