config: prefer core.compression=5
When initializing a new repository or updating a repository's
config, prefer to set a core.compression value of 5 (leaving an
existing valid but different value alone on config update).
There are two reasons for this:
1) If left unset the defaults for core.compression and
core.looseCompression differ. That implies potentially
wasteful recompression may take place when packing loose
objects into packs.
2) The default value (-1) which specifies the zlib default
(which is currently 6) does not provide the best tradeoff.
Number (1) could be corrected simply by setting a core.compression
value of -1 which would provide a core.looseCompression default
and levels would then match and (1) would go away.
However, it turns out that the speed difference between levels 4
and 5 is generally somewhat less than the speed difference between
levels 5 and 6 (the zlib default) while the space savings between
levels 4 and 5 is generally double the space savings between
levels 5 and 6.
This may not be the case generally but seems to be the case when
dealing with Git objects. In other words, level 5 is the
inflection point of the graph, not 6. Thus level 5 provides the
better speed, space and time tradeoff than level 6 does.
Make it so.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>