Stage first 25k new-side lines in a 50k-line file: grit add --lines vs git apply --cached
repo: synth-10k extended by one committed 50k-line large.txt, modified into 500 hunks; file/commit counts derived from recounted base plus that setup step · 10,001 files · 1,001 commits · 800 refs
| tool | median | min | max | runs | peak memory |
|---|---|---|---|---|---|
| git | 12 ms | 12 ms | 35 ms | 20 | 10 MB |
| grit | 35 ms | 34 ms | 81 ms | 20 | 33 MB |
$ git apply --cached /tmp/grit-bench-scratch/daily-synth-10k/lines-half.patch
$ grit add --lines 'large.txt':1-25000 -- large.txt