You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is slow to expand a sparse index in-memory due to parsing of trees.
We aim to minimize that performance cost when possible. 'git add -p'
uses 'git apply' child processes to modify the index, but still there
are some expansions that occur.
It turns out that control flows out of cmd_add() in the interactive
cases before the lines that confirm that the builtin is integrated with
the sparse index. We need to move that earlier to ensure it prevents a
full index expansion on read.
Add more test cases that confirm that these interactive add options work
with the sparse index. One interesting aspect here is that the '-i'
option avoids expanding the sparse index when a sparse directory exists
on disk while the '-p' option does hit the ensure_full_index() method.
This leaves some room for improvement, but this case should be atypical
as users should remain within their sparse-checkout.
Signed-off-by: Derrick Stolee <[email protected]>
0 commit comments