First, I would check if that reference is still in that idx file after
git gc
git repack -Ad # kills in-pack garbage
git prune # kills loose garbage
Use Git 2.32 (Q2 2021) considering:
See commit 14e7b83 (19 Mar 2021), commit 2a15964, commit 13d746a, commit dab3247, commit f25e33c (05 Mar 2021), and commit 0fabafd, commit 339bce2, commit c9fff00, commit f62312e (22 Feb 2021) by Taylor Blau (ttaylorr
).
See commit ccae01c (05 Mar 2021) by Junio C Hamano (gitster
).
See commit 20b031f, commit 6325da1, commit fbf20ae, commit 60bb5f2 (22 Feb 2021) by Jeff King (peff
).
(Merged by Junio C Hamano -- gitster
-- in commit 2744383, 24 Mar 2021)
revision
: learn '--no-kept-objects'
Signed-off-by: Taylor Blau
Reviewed-by: Jeff King
A future caller will want to be able to perform a reachability traversal which terminates when visiting an object found in a kept pack.
The closest existing option is '--honor-pack-keep
', but this isn't quite what we want.
Instead of halting the traversal midway through, a full traversal is always performed, and the results are only trimmed afterwords.
Besides needing to introduce a new flag (since culling results post-facto can be different than halting the traversal as it's happening), there is an additional wrinkle handling the distinction in-core and on-disk kept packs.
That is: what kinds of kept pack should stop the traversal?
Introduce '--no-kept-objects[=<on-disk|in-core>]
' to specify which kinds of kept packs, if any, should stop a traversal.
This can be useful for callers that want to perform a reachability analysis, but want to leave certain packs alone (for e.g., when doing a geometric repack that has some "large" packs which are kept in-core that it wants to leave alone).
Note: This is an "internal-use" option only, but interesting to know about, to experiment in your case.