git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Nicolas Pitre
Message 8 of 8 in “enhancements to 'git verify-pack'”
  1. 0/4 enhancements to 'git verify-pack'Nicolas Pitre, Feb 28, 2008
  2. 1/4 factorize revindex code out of builtin-pack-objects.cNicolas Pitre, Feb 28, 2008
  3. 2/4 make verify_one_pack() a bit less wrong wrt packed_git structureNicolas Pitre, Feb 28, 2008
  4. 3/4 fix unimplemented packed_object_info_detail() featuresNicolas Pitre, Feb 28, 2008
  5. 4/4 add storage size output to 'git verify-pack -v'Nicolas Pitre, Feb 28, 2008
  6. Junio C HamanoMar 1, 2008
  7. Nicolas PitreMar 1, 2008
  8. Junio C HamanoMar 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.