4 repos · 23 commands · 2 broken · 1 slow · 4 filed
Dogfooded stash, worktrees and reflog end to end on scratch repos, octocat/Hello-World and a git/git clone (4.8k files, 82k commits), comparing with system git for state, fsck and timing. Everyday flows are correct and fast, and stash and worktree interop with git works both ways. I found and filed 4 bugs: stash apply --index stages unstaged edits, reset --hard rewrites unchanged files after a gitlink (4-6x slower than git), the HEAD reflog misses the detach when a rebase stops on a conflict, and stash pop can half-apply when the auto-gc repack races it.
| repo | files | commits | .git | notes |
|---|---|---|---|---|
| git/git | 4,864 | 82,725 | 317 MB | clone with --depth 8000 --no-tags still yielded full history; has gitlinks (sha1collisiondetection, subprojects/gitk) |
| octocat/Hello-World | 1 | 3 | 1 MB | |
| scratch/10k-files (big) | 10,000 | 1 | 3 MB | synthetic: 3000 modified tracked + 10000 untracked files for stash |
| scratch/stash-worktree-reflog (s1,s2,r1,rc2,gcw) | 9 | 9 | 1 MB | small repos for functional edge cases |
| command | repo | grit | git | grit/git | result | notes |
|---|---|---|---|---|---|---|
| grit stash push -u (300 modified + 50 untracked) | git/git | 70 ms | 100 ms | 0.7× | ok | single timed runs, /usr/bin/time -l |
| grit stash pop | git/git | 30 ms | 75 ms | 0.4× | ok | |
| grit worktree add ../wt -b w1 | git/git | 300 ms | 340 ms | 0.9× | ok | |
| grit worktree remove | git/git | 190 ms | 230 ms | 0.8× | ok | |
| grit worktree list | git/git | 3.0 ms | 3.0 ms | 1.0× | ok | |
| grit reset --hard (clean tree) | git/git | 354 ms | 62 ms | 5.7× | slow | rewrites 2711 clean files per run; #2559. hyperfine -w1 -r8 -N; git 62-92 ms |
| grit status | git/git | 27 ms | 36 ms | 0.8× | ok | |
| grit reset --mixed | git/git | 24 ms | 14 ms | 1.7× | ok | both instant |
| grit stash push -u (3000 modified + 10000 untracked) | scratch/10k-files (big) | 2.42 s | 3.73 s | 0.6× | ok | |
| grit stash pop (3000 modified + 10000 untracked) | scratch/10k-files (big) | 430 ms | 1.02 s | 0.4× | ok | occasionally fails right after the push when auto-gc repacks concurrently: #2561 |
| grit stash apply --index / pop --index / stash branch | scratch/stash-worktree-reflog | — | — | — | wrong | stages unstaged edits when stash index == HEAD; #2558 |
| grit stash push --hunks/--lines/--keep-index/--staged/-- paths | scratch/stash-worktree-reflog | — | — | — | ok | |
| grit stash push -u / pop with binary, exec bit, symlink, rename, delete | scratch/stash-worktree-reflog | — | — | — | ok | round-trips with git stash pop --index; status and tree identical |
| grit stash apply with conflict / pop with conflict | scratch/stash-worktree-reflog | — | — | — | ok | markers match git, stash kept, exit 1 |
| grit stash list/show --json --markdown | scratch/stash-worktree-reflog | — | — | — | ok | stash clear --json prints {"cleared":N,"dry_run":true} and exits 1 without --force; confusing but intentional |
| grit worktree add/list/remove/lock/unlock/move/repair/prune (+ --json/--markdown) | scratch/stash-worktree-reflog | — | — | — | ok | git agrees on worktree list/fsck; remove -f also removes a locked worktree |
| grit reflog / reflog show REF / list / --json / --markdown / --grep / --since | scratch/stash-worktree-reflog | — | — | — | ok | |
| grit reflog delete / expire --dry-run / expire --all | scratch/stash-worktree-reflog | — | — | — | ok | |
| grit resolve HEAD@{n} / @{-1} / @{5 minutes ago} | scratch/stash-worktree-reflog | — | — | — | ok | identical to git rev-parse, including the 'only goes back to' warning |
| grit rebase main (clean) + reflog | scratch/stash-worktree-reflog | — | — | — | ok | |
| grit rebase main (conflict) / --continue / --abort + reflog | scratch/stash-worktree-reflog | — | — | — | wrong | no HEAD reflog entry for the detach; #2560 |
| grit gc / gc prune --older-than now with stash, worktree HEAD and worktree index | scratch/stash-worktree-reflog | — | — | — | ok | nothing reachable was pruned; --older-than now misses objects created in the same second |
| grit stash / worktree / reflog on octocat/Hello-World | octocat/Hello-World | — | — | — | ok |