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.
| repo | files | commits | .git | notes |
|---|---|---|---|---|
| git/git | 4,864 | 82,712 | 326 MB | single pack, 1022 packed refs, no commit-graph |
| rust-lang/cargo | 3,078 | 23,639 | 82 MB | |
| octocat/Hello-World | 1 | 3 | 1 MB | |
| scratch/history (rename, merge, tags) | 6 | 37 | 1 MB | /tmp/dogfood/scratch, built with git |
| scratch/edge (modes, symlink, binary, block move) | 3 | 5 | 1 MB | |
| scratch/mm (mailmap shapes) | 1 | 5 | 1 MB |
| command | repo | grit | git | grit/git | result | notes |
|---|---|---|---|---|---|---|
| grit log --oneline -n 1000 | git/git | 10 ms | 20 ms | 0.5× | ok | |
| grit log --oneline -n 100000 (full walk) | git/git | 590 ms | 695 ms | 0.8× | ok | faster than git |
| grit revs --count HEAD | git/git | 429 ms | 584 ms | 0.7× | ok | |
| grit log --oneline -- Makefile | git/git | 590 ms | 760 ms | 0.8× | ok | |
| grit log --follow --oneline -- builtin/log.c | git/git | 950 ms | 1.85 s | 0.5× | ok | faster, but commit set differs from git after merges: existing #2459 |
| grit log --follow --oneline -- Cargo.toml | rust-lang/cargo | — | — | — | wrong | 944 commits vs git 1029; same cause as open #2459 (git --follow skips merge simplification, grit does not) |
| grit log --oneline --author=Junio | git/git | 1.55 s | 768 ms | 2.0× | slow | #2555 (2x); with explicit -n 100000 grit is 950 ms |
| grit log --oneline --grep=rebase | git/git | 1.27 s | 777 ms | 1.6× | slow | #2555; 0.65 s with explicit -n |
| grit log --oneline --no-merges | git/git | 1.26 s | 707 ms | 1.8× | slow | #2555, +117 MB |
| grit log --oneline --merges | git/git | 913 ms | 655 ms | 1.4× | ok | +258 ms, part of #2555 |
| grit log --oneline --decorate -n 100000 | git/git | 1.48 s | 747 ms | 2.0× | slow | #2554; 2x |
| grit log --oneline --decorate -n 100000 | rust-lang/cargo | 390 ms | 180 ms | 2.2× | ok | 2.2x but +210 ms; same cause #2554 |
| grit log --graph --oneline -n 100000 | git/git | 3.18 s | 1.13 s | 2.8× | slow | #2553 (2.8x, 2x memory) |
| grit log --graph --oneline -n 100000 | rust-lang/cargo | 420 ms | 200 ms | 2.1× | ok | 2.1x, part of #2553 |
| grit log --oneline --all -n 1000000 | git/git | 696 ms | 779 ms | 0.9× | ok | |
| grit log --first-parent --oneline -n 100000 | git/git | 435 ms | 207 ms | 2.1× | ok | 2.1x, +230 ms, +70 MB; not filed (cap of 5) |
| grit log --reverse --oneline -n 100000 | git/git | 1.44 s | 800 ms | 1.8× | ok | 1.8x, +640 ms; not filed (cap of 5) |
| grit log --group-by author -n 1000000 | git/git | 1.26 s | 720 ms | 1.8× | wrong | 1.75x slower and counts differ from git shortlog -sne because of mailmap bug #2551 |
| grit log --group-by author -n 1000000 | rust-lang/cargo | 280 ms | 180 ms | 1.6× | ok | output identical to git shortlog -sne |
| grit log --stat -n 200 | git/git | 50 ms | 110 ms | 0.5× | ok | |
| grit log --numstat -n 3000 | git/git | 520 ms | 1.96 s | 0.3× | ok | 3.8x faster |
| grit log -S regex_t -- builtin | git/git | 2.13 s | 2.84 s | 0.8× | ok | |
| grit log -p -n 500 | git/git | 280 ms | 490 ms | 0.6× | ok | |
| grit log --tags --json | rust-lang/cargo | — | — | — | wrong | 24339 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 | — | — | — | ok | commit 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/git | 1.04 s | 1.09 s | 1.0× | ok | per-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/cargo | 98 ms | 125 ms | 0.8× | ok | identical attribution across the rename |
| grit blame -M / -C -C / -L ranges / -L /regex/,+1 / --rev tag / --json / --markdown | scratch/edge | — | — | — | ok | |
| grit blame --ignore-rev <moved-block commit> | scratch/edge | — | — | — | wrong | attributes moved lines differently from git's fuzzy ignore heuristic; obscure, not filed |
| grit diff HEAD~20000 HEAD --stat | git/git | 331 ms | 549 ms | 0.6× | ok | |
| grit diff HEAD~5000 HEAD --stat | git/git | 667 ms | 1.20 s | 0.6× | ok | |
| grit diff v2.0.0 v2.40.0 --shortstat | git/git | 312 ms | 780 ms | 0.4× | ok | |
| grit diff HEAD~20000 HEAD --name-only | git/git | 225 ms | 139 ms | 1.6× | ok | +86 ms, 1.6x on a 5k-file diff; below the bar, not filed |
| grit diff HEAD~5000 HEAD -p | git/git | 990 ms | 1.39 s | 0.7× | ok | |
| grit diff HEAD~500 HEAD~300 (--name-status/--stat/--numstat/--patch-text, renames) | rust-lang/cargo | — | — | — | ok | same 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 / --markdown | scratch/history | — | — | — | ok | |
| grit shortlog [--target]; grit revs --count/--left-right; grit merge-base; grit describe | scratch/history | — | — | — | ok | |
| grit log, show, diff, blame, shortlog, revs on empty repo | scratch/edge | — | — | — | ok | clear 'no commits yet' error, exit 1; the hint text is printed twice |
| grit log / blame / show on Hello-World | octocat/Hello-World | — | — | — | ok |