6 repos · 30 commands · 1 broken · 10 slow · 5 filed
As a new-CLI author I built a small front end ('stk') on grit-lib's public API only (status, commit, branch, switch, reset, merge, restack via start/continue/skip/abort_rebase, fetch with progress/cancel, a ref-snapshot op log with undo) and ran it on cargo, git/git and synthetic 45k/200k-file repos, plus a kill -9 matrix and CLI comparisons against git 2.43. The library API is typed and pleasant (everything compiled almost first try, errors are typed enums, conflicts are values, a long-lived Repository sees external git changes, cancel is prompt and rolls back cleanly), and I re-verified 4 fixes. I filed 5 issues: undo after a conflicted rebase is impossible, flat-directory status/diff is ~3x slower than git (no stat parallelism), fetch gives no progress for most of its runtime, checkout-style commands use 3-5x git's memory, and an integrate_branch API trap; a 6th (log memory) hit the report cap and is listed under problems.
| repo | files | commits | .git | notes |
|---|---|---|---|---|
| git/git | 4,857 | 82,616 | 324 MB | bare mirror clone at /tmp/dogfood/git.git plus a local clone (gitgit) |
| rust-lang/cargo | 3,078 | 23,596 | 81 MB | also local clones for the rebase repro (cargo2263) and 3000-branch repo (s4) |
| octocat/Hello-World | 1 | 3 | 1 MB | cloned, otherwise unused |
| scratch/flat-200k | 200,000 | 1 | 33 MB | 200,000 files in one directory (loose then packed by auto gc) |
| scratch/wide-45k | 45,000 | 2 | 14 MB | 30 dirs x 1500 files; branch other rewrites 22.5k, main the other 22.5k; used for kill -9 matrix and checkout memory |
| scratch/stack repos (s1-s4, er1, u2, crlf) | — | — | — | small fixtures for restack, merge, errors, CRLF |
| command | repo | grit | git | grit/git | result | notes |
|---|---|---|---|---|---|---|
| grit status | git/git | 10 ms | 8.0 ms | 1.3× | ok | 2.1x memory, absolute 10 MB |
| grit status | rust-lang/cargo | 19 ms | 7.0 ms | 2.7× | ok | 2.7x time but 12 ms absolute; untracked scan is 11 of ~13 ms in-process |
| grit status | scratch/flat-200k | 176 ms | 60 ms | 2.9× | slow | 2.9x; single directory -> serial stat; filed #2276 |
| grit diff | scratch/flat-200k | 168 ms | 54 ms | 3.1× | slow | 3.1x; #2276 |
| grit add . | scratch/flat-200k | 231 ms | 122 ms | 1.9× | ok | 1.9x |
| grit status | scratch/wide-45k | 18 ms | 14 ms | 1.3× | ok | |
| grit log --oneline (full) | rust-lang/cargo | 223 ms | 182 ms | 1.2× | memory | 2.8x RSS, grows linearly with commits; not filed (report cap) |
| grit log --oneline (full) | git/git | 784 ms | 693 ms | 1.1× | memory | 2.8x RSS; --json 277 MB (4.1x) |
| grit log --oneline -- src/cargo/core | rust-lang/cargo | 236 ms | 208 ms | 1.1× | ok | |
| grit revs --count HEAD | git/git | 773 ms | 576 ms | 1.3× | memory | 2.0x RSS, 1.34x time |
| grit revs --count HEAD~5000..HEAD | rust-lang/cargo | 168 ms | 143 ms | 1.2× | ok | |
| grit cat HEAD:data (200k-entry tree) | scratch/flat-200k | 73 ms | 76 ms | 1.0× | memory | time fixed (#2269) but RSS 3.7x human, 5.5x json (103 MB) |
| grit merge other (22.5k files each side) | scratch/wide-45k | 1.41 s | 922 ms | 1.5× | memory | 4.2x RSS, 1.5x time; filed #2280 |
| grit switch other (22.5k files) | scratch/wide-45k | 714 ms | 1.28 s | 0.6× | memory | 3.8x RSS; #2280 |
| grit reset --hard other (22.5k files) | scratch/wide-45k | 741 ms | 995 ms | 0.7× | memory | 4.7x RSS; #2280 |
| grit stash pop (22.5k files) | scratch/wide-45k | 515 ms | 826 ms | 0.6× | memory | 2.6x RSS; #2280 |
| grit switch --detach HEAD~20000 (5,223 files) | git/git | 327 ms | 155 ms | 2.1× | ok | 2.1x time |
| grit switch --detach HEAD~6000 (3,314 files) | rust-lang/cargo | 159 ms | 130 ms | 1.2× | ok | |
| grit rebase --update-refs head master (60 commits) | rust-lang/cargo | 430 ms | 307 ms | 1.4× | ok | flat in commit count; #2263 verified fixed |
| grit fetch origin (file://, empty dst) | rust-lang/cargo | 4.25 s | 4.26 s | 1.0× | ok | 1.9x RSS (borderline); progress nearly absent #2278 |
| grit fetch origin (file://, empty dst) | git/git | 25.67 s | 21.88 s | 1.2× | ok | 1.8x RSS, 1.17x time; 17.5 s with no progress events #2278 |
| grit clone file:// | rust-lang/cargo | 4.27 s | 4.19 s | 1.0× | ok | |
| grit branch | rust-lang/cargo (3001 branches) | 13 ms | 16 ms | 0.8× | ok | |
| stk restack (library start_rebase, 3000 other branches) | rust-lang/cargo | 358 ms | 149 ms | 2.4× | ok | git rebase master; grit CLI rebase 323 ms / 46 MB vs git 149 ms / 22 MB |
| stk restack + continue/skip/abort (library) | scratch/stack | — | — | — | ok | conflicts as typed values, skip/abort correct, fsck clean |
| grit history undo (after conflicted rebase --continue) | scratch/stack | — | — | — | error | #2274 |
| kill -9 matrix switch/reset/merge/stash pop/pick/rebase | scratch/wide-45k | — | — | — | ok | fsck clean, HEAD never half-moved, stash retained, typed stale-lock error |
| cancel at 300 ms: switch / reset --hard (library) | scratch/wide-45k | — | — | — | ok | rolled back, tree clean, no lock |
| create_commit x4 threads x30 (library) | scratch | — | — | — | ok | only typed ExpectedMismatch losses, history consistent (Linux sanity for #2261) |
| CRLF/autocrlf/eol checkout round trip (reset --hard) vs git | scratch/crlf | — | — | — | ok | worktree bytes identical to git for autocrlf=true/input/false and core.eol=crlf with text=auto/eol=lf/eol=crlf/binary attrs |