aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-pack-objects.txt
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-08-28 18:49:07 -0400
committerJunio C Hamano <gitster@pobox.com>2023-08-29 11:58:06 -0700
commit61568efa95608fdafffe67967a82e88bcd90fade (patch)
tree388adbd8914663200d9c680738073a58089f3172 /Documentation/git-pack-objects.txt
parente741c078721f8232da769a1100433d96c4393b32 (diff)
downloadgit-61568efa95608fdafffe67967a82e88bcd90fade.tar.gz
builtin/pack-objects.c: support `--max-pack-size` with `--cruft`
When pack-objects learned the `--cruft` option back in b757353676 (builtin/pack-objects.c: --cruft without expiration, 2022-05-20), we explicitly forbade `--cruft` with `--max-pack-size`. At the time, there was no specific rationale given in the patch for not supporting the `--max-pack-size` option with `--cruft`. (As best I can remember, it's because we were trying to push users towards only ever having a single cruft pack, but I cannot be sure). However, `--max-pack-size` is flexible enough that it already works with `--cruft` and can shard unreachable objects across multiple cruft packs, creating separate ".mtimes" files as appropriate. In fact, the `--max-pack-size` option worked with `--cruft` as far back as b757353676! This is because we overwrite the `written_list`, and pass down the appropriate length, i.e. the number of objects written in each pack shard. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-pack-objects.txt')
-rw-r--r--Documentation/git-pack-objects.txt4
1 files changed, 1 insertions, 3 deletions
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index a9995a932c..dea7eacb0f 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -116,9 +116,7 @@ unreachable object whose mtime is newer than the `--cruft-expiration`).
+
Incompatible with `--unpack-unreachable`, `--keep-unreachable`,
`--pack-loose-unreachable`, `--stdin-packs`, as well as any other
-options which imply `--revs`. Also incompatible with `--max-pack-size`;
-when this option is set, the maximum pack size is not inferred from
-`pack.packSizeLimit`.
+options which imply `--revs`.
--cruft-expiration=<approxidate>::
If specified, objects are eliminated from the cruft pack if they