git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Using index-pack in place of verify-pack
@ 2011-02-28  9:49 Junio C Hamano
  2011-02-28  9:49 ` [PATCH 1/5] index-pack: group the delta-base array entries also by type Junio C Hamano
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Junio C Hamano @ 2011-02-28  9:49 UTC (permalink / raw)
  To: git; +Cc: Shawn O. Pearce

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(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-02-28 19:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-28  9:49 [PATCH 0/5] Using index-pack in place of verify-pack Junio C Hamano
2011-02-28  9:49 ` [PATCH 1/5] index-pack: group the delta-base array entries also by type Junio C Hamano
2011-02-28  9:49 ` [PATCH 2/5] write_idx_file: introduce a struct to hold idx customization options Junio C Hamano
2011-02-28  9:49 ` [PATCH 3/5] index-pack: --verify Junio C Hamano
2011-02-28 17:48   ` Shawn O. Pearce
2011-02-28 18:54     ` Junio C Hamano
2011-02-28  9:49 ` [PATCH 4/5] write_idx_file: need_large_offset() helper function Junio C Hamano
2011-02-28  9:49 ` [PATCH 5/5] index-pack --verify: read anomalous offsets from v2 idx file Junio C Hamano
2011-02-28 13:07 ` [PATCH 0/5] Using index-pack in place of verify-pack Sverre Rabbelier
2011-02-28 16:16   ` Junio C Hamano
2011-02-28 16:46     ` Sverre Rabbelier
2011-02-28 16:58       ` Jeff King
2011-02-28 17:01         ` Sverre Rabbelier
2011-02-28 17:25         ` Shawn O. Pearce
2011-02-28 19:50         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).