• Dana How's avatar
    Custom compression levels for objects and packs · 960ccca6
    Dana How authored
    Add config variables pack.compression and core.loosecompression ,
    and switch --compression=level to pack-objects.
    
    Loose objects will be compressed using core.loosecompression if set,
    else core.compression if set, else Z_BEST_SPEED.
    Packed objects will be compressed using --compression=level if seen,
    else pack.compression if set, else core.compression if set,
    else Z_DEFAULT_COMPRESSION.  This is the "pack compression level".
    
    Loose objects added to a pack undeltified will be recompressed
    to the pack compression level if it is unequal to the current
    loose compression level by the preceding rules,  or if the loose
    object was written while core.legacyheaders = true.  Newly
    deltified loose objects are always compressed to the current
    pack compression level.
    
    Previously packed objects added to a pack are recompressed
    to the current pack compression level exactly when their
    deltification status changes,  since the previous pack data
    cannot be reused.
    
    In either case,  the --no-reuse-object switch from the first
    patch below will always force recompression to the current pack
    compression level,  instead of assuming the pack compression level
    hasn't changed and pack data can be reused when possible.
    
    This applies on top of the following patches from Nicolas Pitre:
    [PATCH] allow for undeltified objects not to be reused
    [PATCH] make "repack -f" imply "pack-objects --no-reuse-object"
    Signed-off-by: default avatarDana L. How <[email protected]>
    Signed-off-by: default avatarJunio C Hamano <[email protected]>
    960ccca6
csum-file.h 691 Bytes