Skip to content

Commit 70b128c

Browse files
phillipwoodgitster
authored andcommitted
midx docs: clarify tie breaking
Clarify what happens when an object exists in more than one pack, but not in the preferred pack. "git multi-pack-index repack" relies on ties for objects that are not in the preferred pack being resolved in favor of the newest pack that contains a copy of the object. If ties were resolved in favor of the oldest pack as the current documentation suggests the multi-pack index would not reference any of the objects in the pack created by "git multi-pack-index repack". Helped-by: Taylor Blau <[email protected]> Signed-off-by: Phillip Wood <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3aa98a6 commit 70b128c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Documentation/git-multi-pack-index.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ write::
3838
+
3939
--
4040
--preferred-pack=<pack>::
41-
Optionally specify the tie-breaking pack used when
42-
multiple packs contain the same object. `<pack>` must
43-
contain at least one object. If not given, ties are
44-
broken in favor of the pack with the lowest mtime.
41+
When specified, break ties in favor of this pack when
42+
there are additional copies of its objects in other
43+
packs. Ties for objects not found in the preferred
44+
pack are always resolved in favor of the copy in the
45+
pack with the highest mtime. If unspecified, the pack
46+
with the lowest mtime is used by default. The
47+
preferred pack must have at least one object.
4548

4649
--[no-]bitmap::
4750
Control whether or not a multi-pack bitmap is written.

0 commit comments

Comments
 (0)