diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-04-15 18:36:16 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-16 07:52:29 +0300 |
commit | 8fc67762471c60ee644e6e100a3a85cf5a8631a0 (patch) | |
tree | c40440e93fb21d5aabf9a039cc5266c9cf349b8f /Documentation | |
parent | 55dfe13df9bb38809bc45b8d6d5c7f5bf0470c11 (diff) |
gc: handle a corner case in gc.bigPackThreshold
This config allows us to keep <N> packs back if their size is larger
than a limit. But if this N >= gc.autoPackLimit, we may have a
problem. We are supposed to reduce the number of packs after a
threshold because it affects performance.
We could tell the user that they have incompatible gc.bigPackThreshold
and gc.autoPackLimit, but it's kinda hard when 'git gc --auto' runs in
background. Instead let's fall back to the next best stategy: try to
reduce the number of packs anyway, but keep the base pack out. This
reduces the number of packs to two and hopefully won't take up too
much resources to repack (the assumption still is the base pack takes
most resources to handle).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 728ae902e6..4c3f1d7651 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1564,6 +1564,11 @@ gc.bigPackThreshold:: except that all packs that meet the threshold are kept, not just the base pack. Defaults to zero. Common unit suffixes of 'k', 'm', or 'g' are supported. ++ +Note that if the number of kept packs is more than gc.autoPackLimit, +this configuration variable is ignored, all packs except the base pack +will be repacked. After this the number of packs should go below +gc.autoPackLimit and gc.bigPackThreshold should be respected again. gc.logExpiry:: If the file gc.log exists, then `git gc --auto` won't run |