grit://cooking/dogfood← what’s cooking
Saturday, November 7, 2026 · macOS 15.7 (24G214)

Dogfood on scott-mbp: Stash, worktrees and reflog

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.

os
macOS 15.7 (24G214) · arm64
machine
scott-mbp (agador.sparticus), Apple M3, 24 GB RAM, APFS
versions
grit 0.5.0 (on PATH; has no stash, reset, rebase or reflog subcommands) · main f52021f · 2.52.0
repositories4
repofilescommits.gitnotes
git/git4,86482,725317 MBclone with --depth 8000 --no-tags still yielded full history; has gitlinks (sha1collisiondetection, subprojects/gitk)
octocat/Hello-World131 MB
scratch/10k-files (big)10,00013 MBsynthetic: 3000 modified tracked + 10000 untracked files for stash
scratch/stash-worktree-reflog (s1,s2,r1,rc2,gcw)991 MBsmall repos for functional edge cases
commandsgrit vs. system git, wall time
commandrepogritgitgrit/gitresultnotes
grit stash push -u (300 modified + 50 untracked)git/git70 ms100 ms0.7×oksingle timed runs, /usr/bin/time -l
grit stash popgit/git30 ms75 ms0.4×ok
grit worktree add ../wt -b w1git/git300 ms340 ms0.9×ok
grit worktree removegit/git190 ms230 ms0.8×ok
grit worktree listgit/git3.0 ms3.0 ms1.0×ok
grit reset --hard (clean tree)git/git354 ms62 ms5.7×slowrewrites 2711 clean files per run; #2559. hyperfine -w1 -r8 -N; git 62-92 ms
grit statusgit/git27 ms36 ms0.8×ok
grit reset --mixedgit/git24 ms14 ms1.7×okboth instant
grit stash push -u (3000 modified + 10000 untracked)scratch/10k-files (big)2.42 s3.73 s0.6×ok
grit stash pop (3000 modified + 10000 untracked)scratch/10k-files (big)430 ms1.02 s0.4×okoccasionally fails right after the push when auto-gc repacks concurrently: #2561
grit stash apply --index / pop --index / stash branchscratch/stash-worktree-reflog———wrongstages unstaged edits when stash index == HEAD; #2558
grit stash push --hunks/--lines/--keep-index/--staged/-- pathsscratch/stash-worktree-reflog———ok
grit stash push -u / pop with binary, exec bit, symlink, rename, deletescratch/stash-worktree-reflog———okround-trips with git stash pop --index; status and tree identical
grit stash apply with conflict / pop with conflictscratch/stash-worktree-reflog———okmarkers match git, stash kept, exit 1
grit stash list/show --json --markdownscratch/stash-worktree-reflog———okstash 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———okgit agrees on worktree list/fsck; remove -f also removes a locked worktree
grit reflog / reflog show REF / list / --json / --markdown / --grep / --sincescratch/stash-worktree-reflog———ok
grit reflog delete / expire --dry-run / expire --allscratch/stash-worktree-reflog———ok
grit resolve HEAD@{n} / @{-1} / @{5 minutes ago}scratch/stash-worktree-reflog———okidentical to git rev-parse, including the 'only goes back to' warning
grit rebase main (clean) + reflogscratch/stash-worktree-reflog———ok
grit rebase main (conflict) / --continue / --abort + reflogscratch/stash-worktree-reflog———wrongno HEAD reflog entry for the detach; #2560
grit gc / gc prune --older-than now with stash, worktree HEAD and worktree indexscratch/stash-worktree-reflog———oknothing reachable was pruned; --older-than now misses objects created in the same second
grit stash / worktree / reflog on octocat/Hello-Worldoctocat/Hello-World———ok
worked8
  • ›stash push/pop/apply/drop/branch round-trip tracked, staged, untracked, binary, exec-bit, symlink, rename and delete states with git in both directions, and git fsck stays clean
  • ›stash --hunks/--lines/--staged/--keep-index/paths and --dry-run behave sensibly
  • ›stash conflicts keep the entry, leave git-compatible markers and exit 1
  • ›worktree add/remove/lock/move/repair/prune interoperate with git; branch-in-use checks work for switch, add and branch delete
  • ›reflog matches git entry for entry for commit, reset, checkout, branch create and rebase; --json and --markdown are well-formed
  • ›revision syntax HEAD@{n}, @{-1} and date forms resolve like git
  • ›gc/prune keep stash commits, detached worktree HEADs and worktree-index-only blobs
  • ›stash and worktree speed on git/git is at or better than git; stash of 13k files is 1.5-2.4x faster than git
problems11
  • ›FILED #2558: stash apply/pop --index and stash branch stage unstaged edits when the stash index equals HEAD
  • ›FILED #2559: reset --hard on a clean tree rewrites tracked files after an empty gitlink dir (354 ms vs 62 ms on git/git); a similar older report #981 is closed
  • ›FILED #2560: a conflicted rebase detaches HEAD without a reflog entry (HEAD@{0} != HEAD); follow-up to #2154
  • ›FILED #2561: stash pop right after push can fail 'revision not found' and half-apply during the auto-gc repack
  • ›not filed (minor): `diff --json` without --unstaged/--staged gives no hunk ids although `stash --hunks`/`add --hunks` help say ids come from `grit diff --json`
  • ›not filed (minor): `grit reset --hard HEAD` when nothing moves writes no HEAD reflog entry (git logs 'reset: moving to HEAD')
  • ›not filed (minor): `worktree remove -f` removes a locked worktree, git requires -f -f; help says so
  • ›not filed (minor): `gc prune --older-than now` does not delete objects created in the same second (git expire=now does)
  • ›not filed (minor): `stash push --hunks` leaves a dangling blob; `stash clear` needs --force and its --json reports dry_run:true with exit 1
  • ›not filed (cosmetic): worktree paths print as /tmp/... where git prints the resolved /private/tmp/... on macOS
  • ›release 0.5.0 on PATH lacks stash, reset, rebase and reflog, so release-vs-main comparison was not possible for these commands
bugs filed4
#2558 #2559 #2560 #2561already reported: #981 #2154
next time
  • ›stash and reset --hard on cargo and a repo with many submodules (the gitlink rewrite in #2559)
  • ›other readers racing auto-gc: switch, log, merge while a background repack runs
  • ›worktree add/remove on a partial clone (--blobs none) and sparse checkout
  • ›stash with core.autocrlf and .gitattributes filters; stash pop with untracked-file collisions
  • ›reflog expire/gc interplay with worktree-specific reflogs; concurrent commits from two worktrees
  • ›rebase --onto, --skip and -X with reflog checks; history rebase