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

Re: [PATCH np/pack-v4] index-pack: tighten object type check based on pack version

From
Nicolas Pitre <nico@fluxnic.net>
Date
Sep 18, 2013, 14:39 UTC
Message-ID
<alpine.LFD.2.03.1309181024290.20709@syhkavp.arg>
In-Reply-To
<1379507129-27151-1-git-send-email-pclouds@gmail.com>
On Wed, 18 Sep 2013, Nguyễn Thái Ngọc Duy wrote:
Show 10 quoted lines
> In pack version 4, ref-delta technically could be used to compress any
> objects including commits and trees (both canonical and v4). But it
> does not make sense to do so. It can only lead to performance
> degradation. Catch those packers.
> 
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  I could now verify that pack-objects does not compress commits nor
>  trees using ref-delta in v4. But perhaps these are a bit too strict?
>  Maybe downgrade from die() to warning() and still accept the pack?

Even then... There is a difference between an "invalid" pack and a "suboptimal" one. I don't think we should complain when presented with suboptimal encoding if it is still valid and there is no problem actually processing the data correctly. You never know when this alternative encoding, even if suboptimal, might be handy.

Robustness principle: Be conservative in what you send, be liberal in what you accept.

Nicolas
Previous: Nguyễn Thái Ngọc Duy
Message 2 of 2 in “index-pack: tighten object type check based on pack version”
  1. index-pack: tighten object type check based on pack versionNguyễn Thái Ngọc Duy, Sep 18, 2013
  2. Nicolas PitreSep 18, 2013

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.