From: Junio C Hamano Date: Wed, 24 Mar 2021 21:36:27 +0000 (-0700) Subject: Merge branch 'tb/geometric-repack' X-Git-Tag: v2.32.0-rc0~135 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2744383cbda9bbbe4219bd3532757ae6d28460e1;p=thirdparty%2Fgit.git Merge branch 'tb/geometric-repack' "git repack" so far has been only capable of repacking everything under the sun into a single pack (or split by size). A cleverer strategy to reduce the cost of repacking a repository has been introduced. * tb/geometric-repack: builtin/pack-objects.c: ignore missing links with --stdin-packs builtin/repack.c: reword comment around pack-objects flags builtin/repack.c: be more conservative with unsigned overflows builtin/repack.c: assign pack split later t7703: test --geometric repack with loose objects builtin/repack.c: do not repack single packs with --geometric builtin/repack.c: add '--geometric' option packfile: add kept-pack cache for find_kept_pack_entry() builtin/pack-objects.c: rewrite honor-pack-keep logic p5303: measure time to repack with keep p5303: add missing &&-chains builtin/pack-objects.c: add '--stdin-packs' option revision: learn '--no-kept-objects' packfile: introduce 'find_kept_pack_entry()' --- 2744383cbda9bbbe4219bd3532757ae6d28460e1 diff --cc Documentation/git-repack.txt index fbd4b4ae06,136da9fa0b..317d63cf0d --- a/Documentation/git-repack.txt +++ b/Documentation/git-repack.txt @@@ -165,12 -165,32 +165,35 @@@ depth is 4095 Pass the `--delta-islands` option to `git-pack-objects`, see linkgit:git-pack-objects[1]. + -g=:: + --geometric=:: + Arrange resulting pack structure so that each successive pack + contains at least `` times the number of objects as the + next-largest pack. + + + `git repack` ensures this by determining a "cut" of packfiles that need + to be repacked into one in order to ensure a geometric progression. It + picks the smallest set of packfiles such that as many of the larger + packfiles (by count of objects contained in that pack) may be left + intact. + + + Unlike other repack modes, the set of objects to pack is determined + uniquely by the set of packs being "rolled-up"; in other words, the + packs determined to need to be combined in order to restore a geometric + progression. + + + When `--unpacked` is specified, loose objects are implicitly included in + this "roll-up", without respect to their reachability. This is subject + to change in the future. This option (implying a drastically different + repack mode) is not guaranteed to work with all other combinations of + option to `git repack`). + -Configuration +CONFIGURATION ------------- +Various configuration variables affect packing, see +linkgit:git-config[1] (search for "pack" and "delta"). + By default, the command passes `--delta-base-offset` option to 'git pack-objects'; this typically results in slightly smaller packs, but the generated packs are incompatible with versions of Git older than