grit://cooking/dogfood← what’s cooking
Friday, November 6, 2026 · Ubuntu 24.04 (linux 6.12)

Dogfood: History inspection

6 repos · 39 commands · 4 broken · 5 slow · 5 filed

Dogfooded history inspection (log with paths/ranges/filters, show, blame, diff incl. renames, shortlog/group-by, revs, json/markdown) on git/git, rust-lang/cargo, Hello-World and scratch repos, comparing with git 2.43 for output and speed on release 0.5.29 and main 9561d1bcd. Correctness is very good (log ranges/pathspecs/filters, blame, diff match git on 25+ combos), but I found a mailmap parsing bug, a log ref-selection bug, and several full-history log perf gaps; filed 5 issues.

os
Ubuntu 24.04 (linux 6.12) · x86_64
machine
Cursor cloud VM, 4 vCPU Intel Xeon, 16 GB RAM
versions
grit 0.5.29 · main 9561d1bc · 2.43.0
repositories6
repofilescommits.gitnotes
git/git4,86482,712326 MBsingle pack, 1022 packed refs, no commit-graph
rust-lang/cargo3,07823,63982 MB
octocat/Hello-World131 MB
scratch/history (rename, merge, tags)6371 MB/tmp/dogfood/scratch, built with git
scratch/edge (modes, symlink, binary, block move)351 MB
scratch/mm (mailmap shapes)151 MB
commandsgrit vs. system git, wall time
commandrepogritgitgrit/gitresultnotes
grit log --oneline -n 1000git/git10 ms20 ms0.5×ok
grit log --oneline -n 100000 (full walk)git/git590 ms695 ms0.8×okfaster than git
grit revs --count HEADgit/git429 ms584 ms0.7×ok
grit log --oneline -- Makefilegit/git590 ms760 ms0.8×ok
grit log --follow --oneline -- builtin/log.cgit/git950 ms1.85 s0.5×okfaster, but commit set differs from git after merges: existing #2459
grit log --follow --oneline -- Cargo.tomlrust-lang/cargo———wrong944 commits vs git 1029; same cause as open #2459 (git --follow skips merge simplification, grit does not)
grit log --oneline --author=Juniogit/git1.55 s768 ms2.0×slow#2555 (2x); with explicit -n 100000 grit is 950 ms
grit log --oneline --grep=rebasegit/git1.27 s777 ms1.6×slow#2555; 0.65 s with explicit -n
grit log --oneline --no-mergesgit/git1.26 s707 ms1.8×slow#2555, +117 MB
grit log --oneline --mergesgit/git913 ms655 ms1.4×ok+258 ms, part of #2555
grit log --oneline --decorate -n 100000git/git1.48 s747 ms2.0×slow#2554; 2x
grit log --oneline --decorate -n 100000rust-lang/cargo390 ms180 ms2.2×ok2.2x but +210 ms; same cause #2554
grit log --graph --oneline -n 100000git/git3.18 s1.13 s2.8×slow#2553 (2.8x, 2x memory)
grit log --graph --oneline -n 100000rust-lang/cargo420 ms200 ms2.1×ok2.1x, part of #2553
grit log --oneline --all -n 1000000git/git696 ms779 ms0.9×ok
grit log --first-parent --oneline -n 100000git/git435 ms207 ms2.1×ok2.1x, +230 ms, +70 MB; not filed (cap of 5)
grit log --reverse --oneline -n 100000git/git1.44 s800 ms1.8×ok1.8x, +640 ms; not filed (cap of 5)
grit log --group-by author -n 1000000git/git1.26 s720 ms1.8×wrong1.75x slower and counts differ from git shortlog -sne because of mailmap bug #2551
grit log --group-by author -n 1000000rust-lang/cargo280 ms180 ms1.6×okoutput identical to git shortlog -sne
grit log --stat -n 200git/git50 ms110 ms0.5×ok
grit log --numstat -n 3000git/git520 ms1.96 s0.3×ok3.8x faster
grit log -S regex_t -- builtingit/git2.13 s2.84 s0.8×ok
grit log -p -n 500git/git280 ms490 ms0.6×ok
grit log --tags --jsonrust-lang/cargo———wrong24339 commits vs git rev-list --tags 23722: HEAD is walked too (#2552)
grit log (30 flag/pathspec/range combos: ranges, magic pathspecs, --since, --skip, --reverse, -S, -G, --all-match, --invert-grep, -i)rust-lang/cargo———okcommit lists identical to git in every combo except --tags and --follow
grit blame <file> (Makefile, builtin/log.c, diff.c, t/t0000-basic.sh)git/git1.04 s1.09 s1.0×okper-line commit attribution identical to git blame -l on 4 files; diff.c 1.17 vs 1.20 s; t0000 0.51 vs 0.82 s
grit blame crates/cargo-util-terminal/src/shell.rs (renamed file)rust-lang/cargo98 ms125 ms0.8×okidentical attribution across the rename
grit blame -M / -C -C / -L ranges / -L /regex/,+1 / --rev tag / --json / --markdownscratch/edge———ok
grit blame --ignore-rev <moved-block commit>scratch/edge———wrongattributes moved lines differently from git's fuzzy ignore heuristic; obscure, not filed
grit diff HEAD~20000 HEAD --statgit/git331 ms549 ms0.6×ok
grit diff HEAD~5000 HEAD --statgit/git667 ms1.20 s0.6×ok
grit diff v2.0.0 v2.40.0 --shortstatgit/git312 ms780 ms0.4×ok
grit diff HEAD~20000 HEAD --name-onlygit/git225 ms139 ms1.6×ok+86 ms, 1.6x on a 5k-file diff; below the bar, not filed
grit diff HEAD~5000 HEAD -pgit/git990 ms1.39 s0.7×ok
grit diff HEAD~500 HEAD~300 (--name-status/--stat/--numstat/--patch-text, renames)rust-lang/cargo———oksame file sets, rename detection and counts; git apply --check accepts grit's --patch-text; cosmetic differences listed in problems
grit show / show --stat / show tag / show rev:path / --json / --markdownscratch/history———ok
grit shortlog [--target]; grit revs --count/--left-right; grit merge-base; grit describescratch/history———ok
grit log, show, diff, blame, shortlog, revs on empty reposcratch/edge———okclear 'no commits yet' error, exit 1; the hint text is printed twice
grit log / blame / show on Hello-Worldoctocat/Hello-World———ok
worked6
  • ›log ranges (A..B, A...B, ^tip), --first-parent, --merges/--no-merges, --all, --since/--until/2.years.ago, --skip, --reverse, -S, -G, -i, --all-match, --invert-grep and magic pathspecs (:(exclude), :!, :(glob)) give commit lists identical to git on cargo
  • ›blame attribution is identical to git on 5 files including across a rename; speed equals or beats git; -L ranges, -L /regex/, -M, -C -C, --rev, --json and --markdown all work
  • ›diff between commits: file sets, rename detection, numstat counts and git-apply-compatible --patch-text match git; typically 1.5-3x faster than git on git/git for --stat/--shortstat/-p
  • ›log --numstat/--shortstat 3.8x faster than git; unfiltered full-history log/revs faster than git
  • ›--json and --markdown output are well-formed and consistent across log, show, blame, diff, shortlog
  • ›log --group-by author output is identical to git shortlog -sne on cargo
problems14
  • ›FILED #2551: mailmap lines with a name-only old identity or a trailing comment are dropped, so author grouping and --author matching differ from git (git/git: 1366+36 Scharfe commits unmerged)
  • ›FILED #2552: log --tags/--branches/--remotes also walk HEAD; revs --remotes errors when no ref matches
  • ›FILED #2553: log --graph full history 2.8x slower, 2x memory on git/git
  • ›FILED #2554: log --oneline --decorate 2x slower: per-commit config re-read and objects dir scans
  • ›FILED #2555: commit-filtered log (--no-merges/--merges/--author/--grep) 1.3-2x slower than git; no -n path 2x slower than -n 100000
  • ›Not filed, duplicate: log --follow omits/reorders commits after merges vs git (cargo Cargo.toml 944 vs 1029) = open #2459
  • ›Not filed, cap of 5: log --first-parent is 2.1x slower than git (435 vs 207 ms, +70 MB), log --reverse 1.8x (1.44 vs 0.80 s), log --group-by author 1.75x on git/git (1.26 vs 0.72 s)
  • ›Not filed, UX: `grit log b.txt`, `log -p b.txt`, `show HEAD b.txt` fail with `revision 'b.txt' not found` and no hint to use `-- b.txt` (git accepts unambiguous paths); `blame HEAD file` error shows no usage hint
  • ›Not filed, minor: diff --numstat prints `old => new` instead of git's `{a => b}` brace form; --patch-text omits the mode on `index` lines of renames (git apply still accepts); --stat paths are not middle-elided with `...`
  • ›Not filed, minor: `grit diff <commit> <path>` silently treats path as a filter on the commit's own change (prints 'No changes.') where git would diff worktree vs commit for that path
  • ›Not filed, minor: empty-repo errors print the 'make one with grit commit' hint twice; `revs` with no revision returns an empty list silently while `revs --remotes` errors
  • ›Not filed: `grit grep` does not exist (hint points to log --grep); worktree content search is absent
  • ›Not filed, release only: 0.5.29 prints `(no subject)` for merge commits when `log --oneline --grep` is used; fixed on main
  • ›Not filed, borderline: `grit diff A B --name-only` on a 5k-file diff is 225 vs 139 ms (+86 ms)
bugs filed5
#2551 #2552 #2553 #2554 #2555already reported: #2459 #2264
next time
  • ›Test grit blame/log on very long single-file histories (git/git Documentation/ or t/ dirs) and --follow after the #2459 fix
  • ›blame -C across files, --ignore-revs-file, combined/conflicted merge diffs in show
  • ›Write a commit-graph with git (git commit-graph write) and re-time log, --graph, --no-merges, --author
  • ›Loose-object repos and shallow/partial clones for history commands
  • ›Windows/macOS timings
  • ›--json --filter on log with huge result sets (memory)
  • ›Re-time first-parent, --reverse and --group-by author after #2554/#2555 land