Re: If you would write git from scratch now, what would you change?

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

 



On Mon, 26 Nov 2007, Shawn O. Pearce wrote:

> - Loose objects storage is difficult to work with
> 
>   The standard loose object format of DEFLATE("$type $size\0$data")
>   makes it harder to work with as you need to inflate at least
>   part of the object just to see what the hell it is or how big
>   its final output buffer needs to be.

It is a bit cumbersome indeed, but I'm afraid we're really stuck with it 
since every object SHA1 depends on that format.

>   It also makes it very hard to stream into a packfile if you have
>   determined its not worth creating a delta for the object (or no
>   suitable delta base is available).
> 
>   The new (now deprecated) loose object format that was based on
>   the packfile header format simplified this and made it much
>   easier to work with.

Not really.  Since separate zlib compression levels for loose objects 
and packed objects were introduced, there was a bunch of correctness 
issues.  What do you do when both compression levels are different? 
Sometimes ignore them, sometimes not? Because the default loose object 
compression level is about speed and the default pack compression level 
is about good space reduction, the correct thing to do by default would 
have been to always decompress and recompress anyway when copying an 
otherwise unmodified loose object into a pack.


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]

  Powered by Linux