diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2020-08-11 15:30:18 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-11 14:05:26 -0700 |
commit | 1eb22c7dd803fc05513fde0bd96befeb8c725e05 (patch) | |
tree | a9a3c9fd0f1f6f659dee8dec832480dd311e897c /ci/make-test-artifacts.sh | |
parent | Fifth batch (diff) | |
download | tgif-1eb22c7dd803fc05513fde0bd96befeb8c725e05.tar.xz |
multi-pack-index: repack batches below --batch-size
The --batch-size=<size> option of 'git multi-pack-index repack' is
intended to limit the amount of work done by the repack. In the case of
a large repository, this command should repack a number of small
pack-files but leave the large pack-files alone. Most often, the
repository has one large pack-file from a 'git clone' operation and
number of smaller pack-files from incremental 'git fetch' operations.
The issue with '--batch-size' is that it also _prevents_ the repack from
happening if the expected size of the resulting pack-file is too small.
This was intended as a way to avoid frequent churn of small pack-files,
but it has mostly caused confusion when a repository is of "medium"
size. That is, not enormous like the Windows OS repository, but also not
so small that this incremental repack isn't valuable.
The solution presented here is to collect pack-files for repack if their
expected size is smaller than the batch-size parameter until either the
total expected size exceeds the batch-size or all pack-files are
considered. If there are at least two pack-files, then these are
combined to a new pack-file whose size should not be too much larger
than the batch-size.
This new strategy should succeed in keeping the number of pack-files
small in these "medium" size repositories. The concern about churn is
likely not interesting, as the real control over that is the frequency
in which the repack command is run.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ci/make-test-artifacts.sh')
0 files changed, 0 insertions, 0 deletions