Apply prebuilt half-hunk patch to index: grit add --patch-file 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 | 13 ms | 12 ms | 13 ms | 20 | 10 MB |
| grit | 11 ms | 11 ms | 12 ms | 20 | 23 MB |
$ git apply --cached /tmp/grit-bench-scratch/daily-synth-10k/hunks-half.patch
$ grit add --patch-file /tmp/grit-bench-scratch/daily-synth-10k/hunks-half.patch