Re: [PATCH 2/4] make verify_one_pack() a bit less wrong wrt packed_git structure
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 1, 2008, 20:25 UTC
- Message-ID
- <7vwsomxkch.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LFD.1.00.0803010305230.2899@xanadu.home>
Nicolas Pitre <nico@cam.org> writes:
Show 10 quoted lines
>> I just quickly looked at verify_packfile() after applying your >> series, and it seems that nothing tries to access objects with >> only their SHA-1 names without explicitly telling which pack to >> read from, so it should still be safe even if we did not install >> the packed git (iow, the normal codepath would not try to pick >> up objects from the suspect pack that is being validated). >> >> But it made me feel a bit worried. > > The problem is with the patch that follows, which calls init_revindex().
Oh, Ok.
I see nobody other than pack-check calls packed_object_info_detail, and that would be the only codepath that would load revindex in-core, so the change would be fine. I was worried about having to load revindex which would not help anything but info-detail which is pretty much useless for most operations.