Skip to content

Commit 5e17ee1

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. If the user does not pass a preferred pack then the pack with the lowest mtime is chosen as the preferred pack. For objects that are not in the preferred pack the pack with the highest mtime is used. "git multi-pack-index repack" relies on this behavior. 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". Signed-off-by: Phillip Wood <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d0aa878 commit 5e17ee1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Documentation/git-multi-pack-index.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ write::
4040
--preferred-pack=<pack>::
4141
Optionally specify the tie-breaking pack used when
4242
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.
43+
contain at least one object. If not given the pack with
44+
the lowest mtime is used as the preferred pack. Ties
45+
for objects that are not contained in the preferred
46+
are resolved in favor of the pack with the newest mtime.
4547

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

0 commit comments

Comments
 (0)