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

Re: [PATCH] Verify we know how to read a pack before trying to using it.

From
Nicolas Pitre <nico@cam.org>
Date
Aug 21, 2006, 15:51 UTC
Message-ID
<Pine.LNX.4.64.0608211148120.3851@localhost.localdomain>
In-Reply-To
<20060821071002.GA26029@spearce.org>
On Mon, 21 Aug 2006, Shawn Pearce wrote:
Show 8 quoted lines
> If the pack format were to ever change or be extended in the future
> there is no assurance that just because the pack file lives in
> objects/pack and doesn't end in .idx that we can read and decompress
> its contents properly.
> 
> If we encounter what we think is a pack file and it isn't or we don't
> recognize its version then die and suggest to the user that they
> upgrade to a newer version of GIT which can handle that pack file.

There are already 3 other places where the pack header and version are validated: see git-grep pack_version_ok *.c output. Maybe it would be best to abstract those tests all in one place.

Nicolas
Previous: Junio C Hamano
Message 3 of 3 in “Verify we know how to read a pack before trying to using it.”
  1. Verify we know how to read a pack before trying to using it.Shawn Pearce, Aug 21, 2006
  2. Junio C HamanoAug 21, 2006
  3. Nicolas PitreAug 21, 2006

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.