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

[PATCH 0/5] Using index-pack in place of verify-pack

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 28, 2011, 09:49 UTC
Message-ID
<1298886583-30965-1-git-send-email-gitster@pobox.com>

The verify-pack command walks objects in a pack for contents verification in a very naive way, namely, in the object name order. It is inefficient compared to the way index-pack does, which verifies contents of the objects in the order delta-chain is applied. As the result, the former command would end up reconstituting the same intermediate object in a delta chain number of times while the latter would recreate an object only once.

This series, which is still a WIP, is to teach index-pack "--verify" option, in order to eventually replace verify-pack with it.

The basic idea, which comes from Shawn Pearce, is to run index-pack on a packfile being verified, and compare the resulting .idx file with the existing one, and make sure they match.

Junio C Hamano (5):
  index-pack: group the delta-base array entries also by type
  write_idx_file: introduce a struct to hold idx customization options
  index-pack: --verify
  write_idx_file: need_large_offset() helper function
  index-pack --verify: read anomalous offsets from v2 idx file
 builtin/index-pack.c   |  178 ++++++++++++++++++++++++++++++++++++++----------
 builtin/pack-objects.c |   20 +++---
 csum-file.c            |   46 ++++++++++++-
 csum-file.h            |    2 +
 fast-import.c          |   10 ++-
 pack-write.c           |   82 ++++++++++++++++------
 pack.h                 |   23 +++++-
 t/t5302-pack-index.sh  |   18 +++++
 8 files changed, 301 insertions(+), 78 deletions(-)
Next: Junio C Hamano
Message 1 of 15 in “Using index-pack in place of verify-pack”
  1. 0/5 Using index-pack in place of verify-packJunio C Hamano, Feb 28, 2011
  2. 1/5 index-pack: group the delta-base array entries also by typeJunio C Hamano, Feb 28, 2011
  3. 2/5 write_idx_file: introduce a struct to hold idx customization optionsJunio C Hamano, Feb 28, 2011
  4. 3/5 index-pack: --verifyJunio C Hamano, Feb 28, 2011
  5. Shawn O. PearceFeb 28, 2011
  6. Junio C HamanoFeb 28, 2011
  7. 4/5 write_idx_file: need_large_offset() helper functionJunio C Hamano, Feb 28, 2011
  8. 5/5 index-pack --verify: read anomalous offsets from v2 idx fileJunio C Hamano, Feb 28, 2011
  9. Sverre RabbelierFeb 28, 2011
  10. Junio C HamanoFeb 28, 2011
  11. Sverre RabbelierFeb 28, 2011
  12. Jeff KingFeb 28, 2011
  13. Sverre RabbelierFeb 28, 2011
  14. Shawn O. PearceFeb 28, 2011
  15. Junio C HamanoFeb 28, 2011

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.