21 roadmap steps across 3 items · 6 issue fixes · 9 other changes
grit v0.5.31 reorganizes grit-lib's public API around repository handles and typed per-area errors, adds custom object store support, and fixes Windows, stash, reset and rebase bugs.
Adds a per-module API consolidation report and a ratchet that prevents repository-style free-function calls from spreading through primary rustdoc examples. It also documents the canonical handle/options/progress/cancellation forms and repairs stale guide links so the documentation check is green.
Moves revision resolution, merge-base/reachability, rev-list/log decoration, grouping, graph, and divergence operations behind the repository-scoped `RevWalk` handle. Ten rev-parse variants collapse into one typed `resolve` API, while CLI behavior remains presentation-only wiring.
Moves client transport, push planning, bundle operations, and snapshot checkout operations behind focused Repository handles, and replaces server free functions with UploadPack/ReceivePack sessions. CLI, protocol/server crates, examples, benchmarks, docs, and compatibility tests are migrated without changing the underlying wire or bundle formats.
Moves history editing and rebase operations behind `Repository::history()` while keeping the existing implementation and typed errors underneath. It consolidates cancellation, exec/hook options, rewording, undo, staged-path helpers, journal recovery, and rebase sessions into one supported handle, with CLI/docs/tests/bench callers migrated.
This consolidates repository diff operations behind `repo.diff()` and one `TreeDiffOptions` type, while retaining crate-private hot-path implementations. It ports the CLI, examples, benchmarks, and tests to the supported handle API and adds broad handle/compatibility coverage; the round-2 amendment fixes optional promisor tests that still called a newly private helper.
Repository users now reach HEAD, ref resolution/mutation/listing, reflogs, and paused operation state through `repo.references()`, `repo.reflogs()`, and `repo.operation()`. The old git-directory/repository-first helpers are crate-private or removed, callers are ported, and a discovered reftable glob-prefix bug is fixed.
This consolidates index, object, config, and maintenance operations into one supported API form per operation. Repository maintenance gains a focused handle, index and object variants move into options structs, config naming is normalized, and CLI/examples/tests/docs are ported to those canonical forms.
This consolidates merge, pick, revert, replay, conflict continuation, and rerere behind `Repository::merge()` and keeps the CLI as thin rendering/wiring. The round-2 commit repairs the three broken rustdoc links from the first review without changing behavior.
Files-only object-store refusals now carry a typed `FilesOnlyOperation` instead of inconsistent string literals. The CLI serializes a stable snake_case operation in structured JSON, and the object-store guide generates its refusal table directly from enum rustdoc.
Adds a test-only source scanner that inventories direct filesystem object-store access in grit-lib and fails when a new access is not explicitly classified. It also documents which subsystems legitimately remain filesystem-only, while tracking known custom-store leaks by the roadmap step intended to remove them.
Repository callers now install a custom primary object store through RepositoryOptions, while OdbBuilder only describes read layers, commit-graph attachment, and alternates. Repository opening owns object-directory resolution and uses one construction path for files-backed and injected stores, with migrated callers, examples, docs, compatibility tests, and an open-path benchmark.
Custom object stores now supply annotated-tag peel data when files refs create `packed-refs`, so clones retain `^` records and both protocol-v2 ls-refs and v0 advertisements expose peeled tags. Repository-scoped ref writes/checks and promisor readers also stop reopening an unrelated `.git/objects` database, while git-dir-only free functions retain their documented files fallback.
Repository initialization can now create bare or worktree repositories around injected object and ref stores. Store-owned directories and files are omitted, object format follows the injected store, injected HEAD is seeded in the backend, and the returned handle retains the full RepositoryOptions configuration.
Adds an opt-in PrunableObjectStore capability so custom writable object stores can participate safely in repository prune and GC. Reachability uses the same refs, reflogs, indexes, worktrees, grace-period, and preciousObjects rules as files storage; unsupported stores receive a typed Prune refusal, while files-only repack/MIDX/commit-graph behavior remains unchanged.
Custom-primary local fetches now spool their temporary pack outside the absent git directory, ingest it into the injected store, and remove it. Fetch also omits `FETCH_HEAD` when there is no git directory, while broad regression and Git interoperability tests prove repository operations remain entirely detached from the configured git-dir path.
Custom object stores now resolve stored change-id prefixes through the object database and compute author groups without probing files-backend packs, bitmaps, or commit-graph files. Files-backed repositories retain their marker and pack-reader fast paths, while tests, docs, and a MemoryStore benchmark define the custom-store behavior.
Adds a reusable repository-level backend conformance harness and wires files-primary, memory-primary, and parity integrations into grit-lib's default test binary. The scripted repository workflow covers commits, branches, diffs, merge/conflict/abort, replay, blame, revision resolution, notes, stash, push/fetch, fsck, and export validation with system Git.
Adds a single end-to-end guide for embedding custom object and ref stores, including capabilities, initialization, performance hooks, conformance suites, filesystem assumptions, and the SQLite example. It also runs the repository conformance/parity harness against SQLite objects plus memory refs, while fixing default blame resolution for injected refs and making SQLite object iteration callback-safe.
Odb now stores its primary backend as one internal enum: a statically dispatched, lazily opened files source or an injected writable store. Hot reads borrow that enum arm rather than cloning Arcs and routing the files backend through a trait object; public API and repository formats remain unchanged.
This branch consolidates commit, merge, replay, signing, and history failures into typed area errors while preserving CLI error kinds. It also introduces typed replay conflict paths and updates docs, snapshots, and compatibility tests, but the current tip is not integration-ready because requested catch-all/API removals are incomplete and full-feature tests do not compile.
This branch introduces `RepositoryError`, routes seven repository discovery/layout/format failures through `Error::Repository`, updates call sites and CLI matching, and renames `Error::Message` to `Error::Verbatim`. It is an incremental slice of the requested final umbrella collapse, not the completed task.
Anonymous push destinations—filesystem paths, URLs, and scp-style strings—no longer become `refs/remotes/<destination>/…` tracking namespaces after a successful push. Configured remotes continue to update their normal tracking refs, and the duplicate remote-name validator was consolidated.
Windows auth now stores grit’s credential manager as an escaped absolute executable path instead of a quote-prefixed helper name. The library owns the formatter, the CLI only calls it, and both system Git and grit can parse and execute the resulting helper value.
The hard-reset stat scan now keeps each filesystem stat attached to the absolute index-entry position emitted by the shared blob scanner. Regression coverage builds repositories with system Git and proves a clean reset preserves inode and mtime after both gitlink and skip-worktree holes.
When stash index restoration does not require a tree merge, bulk checkout no longer leaves worktree-only edits staged. The implementation saves and restores only the stage-0 entries that bulk checkout overwrites, preserving unrelated local index changes while making apply, pop, and branch match system Git.
Rebase now records every detached HEAD transition that matters to recovery. Conflict stops, continue-created resolution commits, final reattachment, and abort all preserve a continuous HEAD reflog, so `HEAD@{0}` resolves to the actual current HEAD while stopped and after restoration.
Makes long-lived object readers recover when background repack moves a loose object into a newly published pack, even when the pack-directory mtime is unchanged. Makes stash apply/pop transactional across tracked and untracked restoration by keeping one checkout journal open until the final index write, including non-bulk symlink paths.
Updates the API-quality ratchet from 29,186 to the actual 29,180-line supported API snapshot. Replaces a flaky elapsed-time assertion in ref transaction validation with a test-only per-thread counter proving that a create performs the same number of stored-ref map probes in an empty store and a 20,000-ref store.
This is a no-op branch: it contains no commits or file changes relative to origin/main. The public-api ratchet failure it was assigned to repair had already been fixed on main before the author began.
Refreshes the checked-in API quality counters to match the already-landed error-contract consolidation, and replaces two stale `ConfigHandle` fixture references with the current `Config` type. The patch is limited to CI baseline/test data and restores the affected API and site checks without changing product behavior.
This changes the daily log/stat verifier to compare grit against one `git log -50 --numstat` walk instead of 50 `git show` calls. That aligns verification with the timed command, preserves empty merge stats, adds parser regression coverage, and records the scenario as settled.
Consolidates grit-lib’s public umbrella error into one typed variant per functional area, moves leaf failures into area-specific non-exhaustive enums, and updates consumers, docs, and enforcement tooling. The round-2 correction preserves history-context classification for generated change-id failures and rewrites the three noncompliant commit messages.
Restores ResetOptions to its semver-baseline shape by removing an internal-only private field from the public constructible struct. The rebase abort path retains its special HEAD-reflog behavior through a crate-private reset helper, while the supported public reset API always keeps the existing default behavior.
Adds a shared repository-level conformance scenario that runs against files-primary and memory-primary object storage, then compares typed outcomes across backends. The follow-up fixes make its history, committed hunks, conflict state, stash restoration, and fetch-ref assertions exact enough to catch shared backend regressions.
Changes a public field’s documentation from an intra-doc link to a plain code span because its target is intentionally private. This removes the rustdoc warning promoted to an error while preserving the documentation’s meaning.
This replaces a plain reference to the private `commit_path` helper in a public test-support field's rustdoc with a valid link to the public `CommitOutcome` type that the field derives from. It is documentation-only and leaves runtime behavior unchanged.