From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: "Shawn O. Pearce" <spearce@spearce.org>
Subject: [PATCH 0/5] Using index-pack in place of verify-pack
Date: Mon, 28 Feb 2011 01:49:38 -0800 [thread overview]
Message-ID: <1298886583-30965-1-git-send-email-gitster@pobox.com> (raw)
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 reply other threads:[~2011-02-28 9:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 9:49 Junio C Hamano [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298886583-30965-1-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).