diff options
author | Nick Alcock <nix@esperi.org.uk> | 2011-11-02 15:46:23 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-05 23:10:43 -0700 |
commit | ebaa1bd407745c4b4c1c0f20c322929fc4371467 (patch) | |
tree | 78b9c99339d486e2c3013aa68b87274834d7c48f /perl/.gitignore | |
parent | Compatibility: declare strtoimax() under NO_STRTOUMAX (diff) | |
download | tgif-ebaa1bd407745c4b4c1c0f20c322929fc4371467.tar.xz |
Support sizes >=2G in various config options accepting 'g' sizes.
The config options core.packedGitWindowSize, core.packedGitLimit,
core.deltaBaseCacheLimit, core.bigFileThreshold, pack.windowMemory and
pack.packSizeLimit all claim to support suffixes up to and including
'g'. This implies that they should accept sizes >=2G on 64-bit
systems: certainly, specifying a size of 3g should not silently be
translated to zero or transformed into a large negative value due to
integer overflow. However, due to use of git_config_int() rather than
git_config_ulong(), that is exactly what happens:
% git config core.bigFileThreshold 2g
% git gc --aggressive # with extra debugging code to print out
# core.bigfilethreshold after parsing
bigfilethreshold: -2147483648
[...]
This is probably irrelevant for core.deltaBaseCacheLimit, but is
problematic for the other values. (It is particularly problematic for
core.packedGitLimit, which can't even be set to its default value in
the config file due to this bug.)
This fixes things for 32-bit platforms as well. They get the usual bad
config error if an overlarge value is specified, e.g.:
fatal: bad config value for 'core.bigfilethreshold' in /home/nix/.gitconfig
This is detected in all cases, even if the 32-bit platform has no size
larger than 'long'. For signed integral configuration values, we also
detect the case where the value is too large for the signed type but
not the unsigned type.
Signed-off-by: Nick Alcock <nix@esperi.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'perl/.gitignore')
0 files changed, 0 insertions, 0 deletions