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

builtin git-bundle - pack contains many more objects than required

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Mar 6, 2007, 04:17 UTC
Message-ID
<45ECEB40.4000907@gmail.com>

builtin-bundle in version v1.5.0.3-271-g5ced057 (commit 5ced0572217f82f20c4a3460) (and probably before) includes far more objects in the pack than are actually necessary. Comparison to the original shell scripts I wrote shows the prerequisites and refs always agree between those (and that is what I tested before), so the problem is apparently in the arguments as passed to pack-objects. I confess to not understanding the revision walking code called from builtin-bundle.c, so I do not have a patch.

However, a simple example:

git>git-rev-list --objects HEAD~1..HEAD 5ced0572217f82f20c4a3460492768e07c08aeea 1d30eaabe4b6f7218e4e4cfff5670a493aa7358e 2a1d6a2be1511f65b601897f05962e5f673257d8 contrib cbd77b2f57114d4fa2f119f1b1ee17968d6d67d4 contrib/emacs 8554e3967cc692c6916e5aee35952074d07e8bf0 contrib/emacs/Makefile

shows that the bundle for this case should have five objects as shown. In this case, 916 objects are actually included in the pack when executing

git bundle create test.bdl HEAD~1..HEAD
Mark
Next: Junio C Hamano
Message 1 of 22 in “builtin git-bundle - pack contains many more objects than required”
  1. Mark LevedahlMar 6, 2007
  2. Junio C HamanoMar 6, 2007
  3. git-bundle: fix pack generation.Junio C Hamano, Mar 6, 2007
  4. Mark LevedahlMar 7, 2007
  5. Junio C HamanoMar 7, 2007
  6. Mark LevedahlMar 7, 2007
  7. Johannes SchindelinMar 7, 2007
  8. Mark LevedahlMar 7, 2007
  9. Johannes SchindelinMar 7, 2007
  10. Junio C HamanoMar 7, 2007
  11. Mark LevedahlMar 7, 2007
  12. Johannes SchindelinMar 7, 2007
  13. Linus TorvaldsMar 7, 2007
  14. git-bundle: Make thin packsJohannes Schindelin, Mar 8, 2007
  15. Linus TorvaldsMar 8, 2007
  16. Johannes SchindelinMar 8, 2007
  17. Junio C HamanoMar 8, 2007
  18. Johannes SchindelinMar 8, 2007
  19. Junio C HamanoMar 7, 2007
  20. git-bundle: avoid packing objects which are in the prerequisitesJohannes Schindelin, Mar 7, 2007
  21. Mark LevedahlMar 8, 2007
  22. Mark LevedahlMar 7, 2007

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.