]> git.ipfire.org Git - thirdparty/git.git/commit
grep: prefetch necessary blobs
authorElijah Newren <newren@gmail.com>
Thu, 14 May 2026 16:25:28 +0000 (16:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 May 2026 19:24:54 +0000 (04:24 +0900)
commit854061ea5484fffc6c54941332115abbd7fc950f
tree0c31df9c8c7adfd858512e08817cbb4a7ad03cd2
parent463c1bfc2b65357569055916e348e1bd9c7a5b25
grep: prefetch necessary blobs

In partial clones, `git grep` fetches necessary blobs on-demand one
at a time, which can be very slow.  In partial clones, add an extra
preliminary walk over the tree similar to grep_tree() which collects
the blobs of interest, and then prefetches them.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/grep.c
t/t7810-grep.sh