git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 4/4] midx docs: clarify tie breaking

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
May 22, 2025, 15:55 UTC
Message-ID
<a140181bd575a867801d9c410ed614b1dfc7d377.1747929225.git.phillip.wood@dunelm.org.uk>
In-Reply-To
<cover.1747929225.git.phillip.wood@dunelm.org.uk>
From: Phillip Wood <phillip.wood@dunelm.org.uk>

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 <me@ttaylorr.com>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
 Documentation/git-multi-pack-index.adoc | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-multi-pack-index.adoc b/Documentation/git-multi-pack-index.adoc
index 631d5c7d15c..b6cd0d7f855 100644
--- a/Documentation/git-multi-pack-index.adoc
+++ b/Documentation/git-multi-pack-index.adoc
@@ -38,10 +38,13 @@ write::
 +
 --
 	--preferred-pack=<pack>::
-		Optionally specify the tie-breaking pack used when
-		multiple packs contain the same object. `<pack>` must
-		contain at least one object. If not given, ties are
-		broken in favor of the pack with the lowest mtime.
+		When specified, break ties in favor of this pack when
+		there are additional copies of its objects in other
+		packs. Ties for objects not found in the preferred
+		pack are always resolved in favor of the copy in the
+		pack with the highest mtime. If unspecified, the pack
+		with the lowest mtime is used by default. The
+		preferred pack must have at least one object.
 
 	--[no-]bitmap::
 		Control whether or not a multi-pack bitmap is written.
-- 
2.49.0.897.gfad3eb7d210
Previous: Phillip WoodNext: Taylor Blau
Message 22 of 25 in “midx repack: fix overflow on 32 bit systems”
  1. 0/4 midx repack: fix overflow on 32 bit systemsPhillip Wood, May 20, 2025
  2. 1/4 midx repack: avoid integer overflow on 32 bit systemsPhillip Wood, May 20, 2025
  3. Taylor BlauMay 20, 2025
  4. Phillip WoodMay 21, 2025
  5. Taylor BlauMay 23, 2025
  6. D. Ben KnobleMay 21, 2025
  7. Junio C HamanoMay 21, 2025
  8. Phillip WoodMay 21, 2025
  9. 2/4 midx repack: avoid potential integer overflow on 64 bit systemsPhillip Wood, May 20, 2025
  10. Taylor BlauMay 20, 2025
  11. Phillip WoodMay 21, 2025
  12. 3/4 midx: avoid negative array indexPhillip Wood, May 20, 2025
  13. Taylor BlauMay 20, 2025
  14. 4/4 midx docs: clarify tie breakingPhillip Wood, May 20, 2025
  15. Taylor BlauMay 20, 2025
  16. Phillip WoodMay 21, 2025
  17. D. Ben KnobleMay 21, 2025
  18. 0/4 midx repack: fix overflow on 32 bit systemsPhillip Wood, May 22, 2025
  19. 2/4 midx repack: avoid potential integer overflow on 64 bit systemsPhillip Wood, May 22, 2025
  20. 1/4 midx repack: avoid integer overflow on 32 bit systemsPhillip Wood, May 22, 2025
  21. 3/4 midx: avoid negative array indexPhillip Wood, May 22, 2025
  22. 4/4 midx docs: clarify tie breakingPhillip Wood, May 22, 2025
  23. Taylor BlauMay 23, 2025
  24. Phillip WoodMay 27, 2025
  25. Junio C HamanoMay 27, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.