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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Sep 2013, Nguyễn Thái Ngọc Duy wrote:

> 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@xxxxxxxxx>
> ---
>  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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]