grit://cooking/dogfood← what’s cooking
Thursday, October 29, 2026 · Windows 11 10.0.26200 (NTFS, Defender on)

Dogfood on win-x64: New-CLI author

7 repos · 28 commands · 2 broken · 5 slow · 5 filed

As a new-CLI author on win-x64 I built a scratch front end on grit-lib's public API (op-log/undo, paged log, fetch progress, integrate with cancel, held-handle repack) and ran the CLI on cargo, git/git, and 22.5k/200k/5k-file synthetic repos. Library and CLI are largely solid on Windows (typed lock/in-use errors, rollback on locked files, long-lived handle survives repack, status/diff on 200k files faster than git), but I found a regression of #2190 (grit add rewrites packed blobs as loose: 71x slower), a case-collision status/diff mismatch, slow cancel rollback, and gaps for building undo on the library. Of the six fixed issues, five verified; #2278 still has 60% silent time.

os
Windows 11 10.0.26200 (NTFS, Defender on) · x86_64
machine
win-x64 worker WIN-H6JSI3IMAJG: Intel i5-12400, 16 GB RAM
versions
grit grit 0.5.24 (cargo build --release -p grit-cli) · main 1d054b51 · git version 2.55.0.windows.5 (peak memory measured on mingw64\bin\git.exe, not the cmd wrapper); system gitconfig core.autocrlf=true core.symlinks=false
repositories7
repofilescommits.gitnotes
rust-lang/cargo3,07823,59681 MB
git/git (bare)4,85782,623325 MB1020 refs; file count is ls-tree of HEAD
octocat/Hello-World130 MBused for repack with open handle
scratch/wide-22.5k22,500113 MB150 dirs; branch other changes every file (git fast-import)
scratch/flat-200k200,000152 MBall files in one directory
scratch/dup1-5k5,00012 MBbranch mod packed with git gc; repro for #2328
scratch/small (stk, cf, lock1, coll3, oplog3, racy)3060 MBstacked-branch, conflict, lock and case-collision fixtures
commandsgrit vs. system git, wall time
commandrepogritgitgrit/gitresultnotes
grit switch other (22.5k files)scratch/wide-22.5k2.93 s5.46 s0.5×okgrit 1.9x faster
grit reset --hard <other> (22.5k files)scratch/wide-22.5k11.57 s5.56 s2.1×ok2.1x slower and 3.9x slower than grit's own switch; duplicate of #2311 (open)
grit stash (22.5k modified files)scratch/wide-22.5k69.61 s7.58 s9.2×slow9x slower; cause largely #2328 duplicate loose writes; also starts background gc --auto
grit stash pop (22.5k files)scratch/wide-22.5k3.29 s6.59 s0.5×ok50 s when a background gc --auto from the preceding grit stash is still running
grit add (22.5k modified, blobs already stored)scratch/wide-22.5k35.05 s2.41 s15×slow#2328
grit add (5k modified, blobs only in a pack)scratch/dup1-5k10.92 s153 ms71×slow#2328: 5000 duplicate loose objects, 71x slower
grit status (clean)scratch/flat-200k498 ms766 ms0.7×ok
grit diffscratch/flat-200k243 ms330 ms0.7×ok
grit fetch origin (local path, full)rust-lang/cargo13.73 s12.84 s1.1×okgit peak is the parent process only (children not counted); silent progress gaps are #2278
library Remote::fetch local path with progress sinkrust-lang/cargo14.07 s——wrong60% of the run emits no progress events (#2278)
grit statusrust-lang/cargo122 ms45 ms2.7×ok2.7x on a single cold run, under the 3x line
grit log -n 1000 --onelinerust-lang/cargo26 ms44 ms0.6×ok
grit diff HEAD~50 HEADrust-lang/cargo62 ms71 ms0.9×ok
grit fsckrust-lang/cargo1.81 s5.92 s0.3×ok
grit revs HEAD~5000..HEADrust-lang/cargo302 ms167 ms1.8×ok
grit merge-base HEAD~500 HEAD~3000rust-lang/cargo67 ms144 ms0.5×ok
library paged log, page 5000 (LogWalkCursor + load rows)rust-lang/cargo229 ms276 ms0.8×ok
library full walk + load_commits_with_decorationsgit/git (bare)1.46 s997 ms1.5×okpage 10000: 778 ms / 101 MB
grit log --json -n 100000git/git (bare)1.25 s997 ms1.3×ok84 MB of JSON incl. full messages; git ran --format=%H%x09%an%x09%B
grit fsckgit/git (bare)16.48 s41.05 s0.4×ok
grit blame Makefilegit/git (bare)1.34 s1.08 s1.2×ok
grit log -n 1000 --oneline -- builtin/log.cgit/git (bare)2.99 s578 ms5.2×slow5.2x; -n 200 -- Makefile 413 vs 89 ms (4.6x); duplicate of #1619 (macOS) now seen on Windows; no commit-graph in the clone
grit rebase main (3-branch stack, update-refs)scratch/small (stk, cf, lock1, coll3, oplog3, racy)———okall three branches moved (#2213)
grit rebase conflict, --continue, history undoscratch/small (stk, cf, lock1, coll3, oplog3, racy)———ok#2274 fixed; stop leaves a dangling empty blob/tree (harmless)
grit switch with exclusively locked filescratch/small (stk, cf, lock1, coll3, oplog3, racy)127 ms——oktyped 'file is in use' message, nothing moved
grit switch collide; grit status; grit diffscratch/small (stk, cf, lock1, coll3, oplog3, racy)———wrong#2329: status clean, diff shows A.txt, no warning
library integrate_branch with FlagCancel at 500..2500 msscratch/wide-22.5k11.91 s2.94 s4.1×slow#2330: cancel@2500 returns after 11.9 s vs 2.9 s uncancelled; all runs roll back cleanly
grit repack -f with library handle openoctocat/Hello-World109 ms62 ms1.8×okheld Repository re-read objects after the pack was replaced
worked8
  • ›Typed, readable errors for locked files (file in use) and held index.lock (LockHeld) with full rollback; no Access denied surprises
  • ›A long-lived Repository handle survives another process replacing packs on Windows
  • ›grit status/diff on a 200k-file directory is faster than git (0.5 s vs 0.77 s, half the memory)
  • ›grit fsck is 2.4-3.3x faster than git on cargo and git/git
  • ›rebase --update-refs on multi-commit stacks, conflict stop/continue and history undo
  • ›Cancellation always leaves HEAD, index and worktree consistent with no stale lock
  • ›serde-models gives a usable StatusModel and result types; ProgressSink/Cancel/Progress traits are easy to implement
  • ›Short-name into_ref for integrate_branch and the paged LogWalkCursor are pleasant APIs; docs on switch/commit/integrate are thorough
problems14
  • ›Filed #2328: grit add/commit/stash rewrite blobs already in a pack as loose objects (regression of closed #2190)
  • ›Filed #2329: case-colliding paths on Windows: no switch warning, grit status clean but diff/git show modified
  • ›Filed #2330: cancelling a 22.5k-file checkout takes up to 9.4 s to return (rollback ~3x forward)
  • ›Filed #2331: no snapshot/restore API for undo logs; stash create fails mid-merge; apply_commit rejects identical untracked; Error serde loses fields
  • ›Filed #2332: API hygiene: hidden pub fields, Vec-only walks, 14 Windows warnings, destructive symlink restore on non-unix, C expression in a rustdoc comment
  • ›#2278 reopened via verify_fix: local fetch is silent for 60% of the run
  • ›Not filed (duplicate #2311): grit reset --hard is 2.1x git and 3.9x grit switch on 22.5k files
  • ›Not filed (duplicate #1619): path-limited log on git/git is 4.6-5.2x slower than git on Windows too
  • ›Not filed (minor UX): grit stash errors 'Committer identity unknown' where git stash works without a configured identity
  • ›Not filed (minor): a conflicted rebase stop leaves a dangling empty blob and empty tree in the ODB
  • ›Not filed (minor): grit-lib example gritx-status hashes work-tree files by writing them with odb().write (pollutes the repo) although hash::hash_object exists
  • ›Not filed (unverified): grit-lib depends on the `sha1dc` crate while AGENTS.md says not to implement sha1dc; I did not check whether it is used
  • ›grit stash starts a background `gc --auto` that competes with the next command (stash pop 3.3 s -> 50 s); folded into #2328 (see also open #1859)
  • ›Release build of grit-cli takes 7.5 min on this machine (i5-12400), grit-lib alone 4 min
bugs filed5
#2328 #2329 #2330 #2331 #2332already reported: #2311 #1619 #1798 #1859 #2142
next time
  • ›Test symlink restore on Windows with core.symlinks=true (Developer Mode): history undo / rewrite rollback of a tracked symlink (restore_worktree_path non-unix branch)
  • ›Run the throttled HTTPS fetch of git/git against grit-http-server and measure ReceivedObjects progress and server RSS (not reached this session)
  • ›Custom ObjectStore plus injected RefStore end to end: commit, merge, fetch, export to disk, git fsck
  • ›Re-run #2328 on Linux/macOS and with gc.auto triggered, and measure grit commit and stash with already-stored content on a 100k-file repo
  • ›Cancel latency of commit/stash/merge sessions after #2142 and of reset --hard rollback with parallel restore
  • ›Build a jj-style op log once a conflicted-state snapshot exists; check undo of stash pop and pick with in-progress operations
  • ›Windows: core.longpaths and 260-char paths through the library, reserved names after #2257, concurrent create_commit from two processes