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.
| repo | files | commits | .git | notes |
|---|---|---|---|---|
| git/git | 4,863 | 82,668 | 324 MB | |
| rust-lang/cargo | 3,078 | 23,611 | 82 MB | |
| octocat/Hello-World | 1 | 3 | 1 MB | |
| scratch/64k-files | 64,001 | 2 | 41 MB | Dir/d0..d63/f0..f999 on branch big, only keep.txt on main |
| scratch/150k-renames | 150,001 | 4 | 27 MB | 150 dirs x 1000 files, one branch renames all dirs |
| scratch/20k-notes | 0 | 20,000 | 8 MB | 20k commits with 20k notes via fast-import |
| command | repo | grit | git | grit/git | result | notes |
|---|---|---|---|---|---|---|
| grit notes add --force -m x <oid> (20k notes) | scratch/20k-notes | 2.8 ms | 1.6 ms | 1.7× | ok | was 35 ms before #2496 |
| grit reset --hard main (remove 64k files, ignorecase=true) | scratch/64k-files | 1.01 s | 590 ms | 1.7× | ok | |
| grit switch big2 (materialise 64k files) | scratch/64k-files | 2.70 s | 1.10 s | 2.5× | memory | 3.2x git RSS, 2.4x time; not filed (parallel checkout trade-off) |
| grit switch main (remove 64k files) | scratch/64k-files | 1.25 s | 970 ms | 1.3× | ok | |
| grit restore --source main --staged --worktree -- Dir (64k) | scratch/64k-files | 8.80 s | 600 ms | 15× | slow | #2516 |
| grit restore --source main --staged -- Dir (64k, index only) | scratch/64k-files | 6.90 s | 60 ms | 115× | slow | #2516 |
| grit merge renames (150k dir renames) | scratch/150k-renames | 10.04 s | 5.27 s | 1.9× | memory | 3.9x git RSS; time 1.9x; #2508 time fixed |
| grit describe | git/git | 1.87 s | 20 ms | 94× | slow | duplicate of #2467/#2462 |
| grit describe | rust-lang/cargo | 210 ms | 110 ms | 1.9× | ok | |
| grit blame builtin/log.c | git/git | 530 ms | 570 ms | 0.9× | ok | |
| grit blame Makefile | git/git | 1.05 s | 1.00 s | 1.1× | ok | attribution identical to git blame --line-porcelain (0 of 4144 lines differ) |
| grit blame revision.c | git/git | 830 ms | 930 ms | 0.9× | ok | |
| grit log -- builtin/log.c | git/git | 550 ms | 490 ms | 1.1× | ok | |
| grit log --follow -- builtin/log.c | git/git | 1.28 s | 1.45 s | 0.9× | wrong | 607 commits vs git 611: duplicate #2459 |
| grit log -S strbuf_release -- strbuf.c | git/git | 650 ms | 690 ms | 0.9× | ok | |
| grit log --stat -n 2000 | git/git | 700 ms | 1.26 s | 0.6× | ok | |
| grit log -p -n 500 | git/git | 210 ms | 450 ms | 0.5× | ok | |
| grit status | git/git | 50 ms | 10 ms | 5.0× | ok | |
| grit revs --count HEAD | git/git | 830 ms | 570 ms | 1.5× | ok | |
| grit revs v2.30.0...v2.31.0 | git/git | 110 ms | 20 ms | 5.5× | slow | duplicate #2109 |
| grit diff v2.30.0 v2.31.0 | git/git | 170 ms | 340 ms | 0.5× | ok | |
| grit fsck | git/git | 16.88 s | 33.93 s | 0.5× | ok | 2x faster than git |
| grit merge-base v2.30.0 v2.31.0 | git/git | 10 ms | 20 ms | 0.5× | ok | |
| grit status | rust-lang/cargo | 10 ms | 5.0 ms | 2.0× | ok | |
| grit fsck | rust-lang/cargo | 1.62 s | 5.78 s | 0.3× | ok | |
| grit log -n 20000 | rust-lang/cargo | 320 ms | 170 ms | 1.9× | ok | |
| grit diff HEAD~2000 HEAD | rust-lang/cargo | 360 ms | 390 ms | 0.9× | ok | |
| grit bundle create --all | rust-lang/cargo | 2.27 s | 1.11 s | 2.0× | ok | 2.0x time, 1.66x RSS; bundle verifies with git and clones |
| grit clone <bundle> | rust-lang/cargo | 1.45 s | 3.68 s | 0.4× | ok | |
| grit fsck (corrupt pack entry size) | scratch/repro | — | — | — | crash | SIGABRT 550 GB alloc, #2517 |
| grit status (truncated index) | rust-lang/cargo | — | — | — | crash | exit 101 panic, #2518 |
| grit status (.git/config malformed) | scratch/cfgt | — | — | — | wrong | 'not a git repository', #2519 |
| RepositoryBundles::create on failure | rust-lang/cargo | — | — | — | wrong | truncates existing 78 MB bundle to 74 bytes, #2515 |
| repo.worktrees().add x16 threads (6 rounds) | scratch/worktrees | — | — | — | ok | 96/96 succeeded, git worktree list agrees |
| grit clone (case-colliding refs, ciopfs FS) | scratch/case | 20 ms | — | — | ok |