]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'tb/geometric-repack'
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Mar 2021 21:36:27 +0000 (14:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Mar 2021 21:36:27 +0000 (14:36 -0700)
"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()'

1  2 
Documentation/git-pack-objects.txt
Documentation/git-repack.txt
builtin/pack-objects.c
packfile.c
revision.c
t/t5300-pack-object.sh

Simple merge
index fbd4b4ae06777f7ee45165c8c5c4d1bf2bbad7d3,136da9fa0bc5ae43cce34fbda2600ad9360e079c..317d63cf0d3ae0dcee44e5185fdd8c4a2b201153
@@@ -165,12 -165,32 +165,35 @@@ depth is 4095
        Pass the `--delta-islands` option to `git-pack-objects`, see
        linkgit:git-pack-objects[1].
  
 -Configuration
+ -g=<factor>::
+ --geometric=<factor>::
+       Arrange resulting pack structure so that each successive pack
+       contains at least `<factor>` 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
  -------------
  
 +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
Simple merge
diff --cc packfile.c
Simple merge
diff --cc revision.c
Simple merge
Simple merge