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 <pclo...@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.


Reply via email to