grit://cooking/dogfood← what’s cooking
Monday, November 2, 2026 · Ubuntu 24.04.5 LTS (kernel 6.12.94)

Dogfood on linux-cloud: New-CLI author

6 repos · 35 commands · 5 broken · 6 slow · 5 filed

As a new-CLI author I wrote a scratch crate on grit-lib's public API (JSON from library types, worktree manager, typed-error audit, concurrent worktree add, bundle backup, mutation fuzzers for index/pack/idx/bundle/config) and cross-checked CLI behaviour against git on git/git, cargo and synthetic 64k-150k file repos. All six 'fixed' issues re-verified on Linux (a ciopfs FUSE overlay stood in for a case-insensitive FS). Found 5 new problems (#2515-#2519): bundle create truncates the old bundle, restore --staged is quadratic in index size, corrupt pack/index inputs abort or panic the process, and a malformed config is reported as 'not a git repository'. The library's typed errors and worktree/blame/describe JSON models are in good shape otherwise.

os
Ubuntu 24.04.5 LTS (kernel 6.12.94) · x86_64
machine
Cursor cloud VM, 4 vCPU Intel Xeon, 15 GB RAM
versions
grit 0.5.28 · main d1cb18b5 · 2.43.0
repositories6
repofilescommits.gitnotes
git/git4,86382,668324 MB
rust-lang/cargo3,07823,61182 MB
octocat/Hello-World131 MB
scratch/64k-files64,001241 MBDir/d0..d63/f0..f999 on branch big, only keep.txt on main
scratch/150k-renames150,001427 MB150 dirs x 1000 files, one branch renames all dirs
scratch/20k-notes020,0008 MB20k commits with 20k notes via fast-import
commandsgrit vs. system git, wall time
commandrepogritgitgrit/gitresultnotes
grit notes add --force -m x <oid> (20k notes)scratch/20k-notes2.8 ms1.6 ms1.7×okwas 35 ms before #2496
grit reset --hard main (remove 64k files, ignorecase=true)scratch/64k-files1.01 s590 ms1.7×ok
grit switch big2 (materialise 64k files)scratch/64k-files2.70 s1.10 s2.5×memory3.2x git RSS, 2.4x time; not filed (parallel checkout trade-off)
grit switch main (remove 64k files)scratch/64k-files1.25 s970 ms1.3×ok
grit restore --source main --staged --worktree -- Dir (64k)scratch/64k-files8.80 s600 ms15×slow#2516
grit restore --source main --staged -- Dir (64k, index only)scratch/64k-files6.90 s60 ms115×slow#2516
grit merge renames (150k dir renames)scratch/150k-renames10.04 s5.27 s1.9×memory3.9x git RSS; time 1.9x; #2508 time fixed
grit describegit/git1.87 s20 ms94×slowduplicate of #2467/#2462
grit describerust-lang/cargo210 ms110 ms1.9×ok
grit blame builtin/log.cgit/git530 ms570 ms0.9×ok
grit blame Makefilegit/git1.05 s1.00 s1.1×okattribution identical to git blame --line-porcelain (0 of 4144 lines differ)
grit blame revision.cgit/git830 ms930 ms0.9×ok
grit log -- builtin/log.cgit/git550 ms490 ms1.1×ok
grit log --follow -- builtin/log.cgit/git1.28 s1.45 s0.9×wrong607 commits vs git 611: duplicate #2459
grit log -S strbuf_release -- strbuf.cgit/git650 ms690 ms0.9×ok
grit log --stat -n 2000git/git700 ms1.26 s0.6×ok
grit log -p -n 500git/git210 ms450 ms0.5×ok
grit statusgit/git50 ms10 ms5.0×ok
grit revs --count HEADgit/git830 ms570 ms1.5×ok
grit revs v2.30.0...v2.31.0git/git110 ms20 ms5.5×slowduplicate #2109
grit diff v2.30.0 v2.31.0git/git170 ms340 ms0.5×ok
grit fsckgit/git16.88 s33.93 s0.5×ok2x faster than git
grit merge-base v2.30.0 v2.31.0git/git10 ms20 ms0.5×ok
grit statusrust-lang/cargo10 ms5.0 ms2.0×ok
grit fsckrust-lang/cargo1.62 s5.78 s0.3×ok
grit log -n 20000rust-lang/cargo320 ms170 ms1.9×ok
grit diff HEAD~2000 HEADrust-lang/cargo360 ms390 ms0.9×ok
grit bundle create --allrust-lang/cargo2.27 s1.11 s2.0×ok2.0x time, 1.66x RSS; bundle verifies with git and clones
grit clone <bundle>rust-lang/cargo1.45 s3.68 s0.4×ok
grit fsck (corrupt pack entry size)scratch/repro———crashSIGABRT 550 GB alloc, #2517
grit status (truncated index)rust-lang/cargo———crashexit 101 panic, #2518
grit status (.git/config malformed)scratch/cfgt———wrong'not a git repository', #2519
RepositoryBundles::create on failurerust-lang/cargo———wrongtruncates existing 78 MB bundle to 74 bytes, #2515
repo.worktrees().add x16 threads (6 rounds)scratch/worktrees———ok96/96 succeeded, git worktree list agrees
grit clone (case-colliding refs, ciopfs FS)scratch/case20 ms——ok
worked8
  • ›grit-lib serde-models: blame, describe, worktrees, status and commit outcomes serialize with sensible shapes
  • ›Worktree handle refuses with typed, context-carrying errors; 96 concurrent adds from threads and separate handles all succeeded and git agrees
  • ›CorruptLooseObject/LockHeld/PathNotInRevision/NameUnavailable errors are typed and carry oid/path
  • ›Blame is identical to git blame on three large git/git files and as fast
  • ›grit fsck is 2-3.5x faster than git fsck on git/git and cargo
  • ›SIGINT during reset/switch/restore of 64k files always ends fully rolled back or fully done; bundle create is cancel-safe in the CLI
  • ›Fuzzing .idx, .rev, packed-refs, config, HEAD, reflog and bundle files (1,500 seeds each where run) produced no panics or hangs
  • ›grit notes add on 20k notes is now 2.8 ms; clone with case-colliding refs works
problems9
  • ›#2515 RepositoryBundles::create truncates the existing bundle before it can fail; no Cancel/Progress; Io(String) errors
  • ›#2516 restore --staged is O(paths x index size): 64k paths 7.9 s vs git 0.06 s; Index::remove has no batch API
  • ›#2517 fsck/blame/cat abort (SIGABRT, ~550 GB alloc) on a pack entry with a huge declared size
  • ›#2518 truncated index panics (exit 101, ~2% of truncation lengths on cargo) and huge entry count aborts
  • ›#2519 malformed .git/config or ~/.gitconfig reported as 'not a git repository' by CLI and Repository::discover; invalid bool value silently accepted
  • ›Not filed: materialising 64k files is 2.4x time / 3.2x RSS of git (grit switch big2: 2.7 s / 57 MB vs 1.1 s / 18 MB); merge of 150k renames uses 3.9x git's RSS (388 MB vs 99 MB); both below the time threshold, memory-only
  • ›Not filed: blame_file, describe, RevWalk::walk have no Cancel/ProgressSink (overlaps #2142)
  • ›Not filed (minor): restore prints one 'Removed' line per path unbounded; grit commit --json lacks committer; PrunedWorktreeEntry.reason is a String; Repository is not UnwindSafe; BranchError::InvalidName.reason and BlameOptions copy-detection error are strings; unknown rev 'x~3' reports AmbiguousArgument{spec:'x'}; status JSON has leftover am_in_progress fields; describe prints v2.30.0-rc2-0-g... where git prints v2.30.0-rc2 for exact tags (format choice)
  • ›Not tested: reftable repos (system git 2.43 cannot read them), macOS/Windows
bugs filed5
#2515 #2516 #2517 #2518 #2519already reported: #2467 #2462 #2459 #2109 #2142 #2430
next time
  • ›Fix-verify #2515-#2519, then extend the mutation fuzzer to pack .idx v2 fanout/64-bit offsets on a large pack, commit-graph, multi-pack-index, split index (sharedindex.*), untracked-cache and sparse-index extensions
  • ›Reftable with a git >= 2.45 binary: round-trip ref transactions from the lib against git for-each-ref, many refs, worktree HEAD tables
  • ›Real case-insensitive filesystem semantics (macOS/Windows) for case-colliding switch/checkout/worktree add; ciopfs works as a Linux stand-in
  • ›Custom ObjectStore + injected RefStore through restack/rewrite/fetch (#2127/#2128/#2131 still open) and a linked-worktree stack
  • ›Library cancel/progress coverage audit: blame_file, describe, RevWalk::walk, diff, fsck, gc handle methods, with a TUI-style cancel-latency test
  • ›Reduce memory of parallel checkout and merge on 100k+ file trees (57 MB vs 18 MB, 388 MB vs 99 MB) against git with a heap profiler
  • ›Re-test describe on git/git after #2467/#2462 land (still 1.9 s vs 0.02 s); --tags, --first-parent, tag tie-breaks