public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail•com>
Cc: git@vger•kernel.org, me@ttaylorr•com,
	Derrick Stolee <derrickstolee@github•com>
Subject: Re: [PATCH 0/4] git fsck: check pack rev-index files
Date: Mon, 17 Apr 2023 14:37:36 -0700	[thread overview]
Message-ID: <xmqqa5z6jilb.fsf@gitster.g> (raw)
In-Reply-To: <pull.1512.git.1681748502.gitgitgadget@gmail.com> (Derrick Stolee via GitGitGadget's message of "Mon, 17 Apr 2023 16:21:37 +0000")

"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail•com> writes:

> This series is based on tb/pack-revindex-on-disk.
>
> The git fsck builtin does not look at the .rev files that pair with .pack
> and .idx files, but should.

Yes, it should.

> ... The fix is simple: delete the .rev file (and regenerate, if
> necessary), but detection is the first step.

> This series adds those checks. The initial check to verify the checksum is
> probably sufficient for most real-world scenarios, but going the extra mile
> to verify the rev-index contents against an in-memory rev-index helps us be
> sure that there isn't a bug in the rev-index writing code of Git (which
> would result in a valid checksum).

Good description.

> Much like other file formats, an invalid
> header needs to be handled separately as a malformed header may prevent the
> data structures from being initialized in the first place.

> This series does not validate a multi-pack-index-<hash>.rev file or the
> rev-index chunk of a multi-pack-index file. These could be fast-follows,
> except that there is no existing equivalent for an in-memory rev-index for
> easy comparison. The rev-index chunk (which is the most-common way for a
> multi-pack-index to have this information) is already covered by existing
> checksum validation, at least.

TIL what "fast-follow" means ;-)

  parent reply	other threads:[~2023-04-17 21:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 16:21 [PATCH 0/4] git fsck: check pack rev-index files Derrick Stolee via GitGitGadget
2023-04-17 16:21 ` [PATCH 1/4] fsck: create scaffolding for rev-index checks Derrick Stolee via GitGitGadget
2023-04-17 22:20   ` Taylor Blau
2023-04-17 16:21 ` [PATCH 2/4] fsck: check rev-index checksums Derrick Stolee via GitGitGadget
2023-04-17 22:15   ` Junio C Hamano
2023-04-18 14:24     ` Derrick Stolee
2023-04-17 22:24   ` Taylor Blau
2023-04-18 14:27     ` Derrick Stolee
2023-04-18 14:51       ` Taylor Blau
2023-04-18 14:57         ` Derrick Stolee
2023-04-18 15:03           ` Taylor Blau
2023-04-17 16:21 ` [PATCH 3/4] fsck: check rev-index position values Derrick Stolee via GitGitGadget
2023-04-17 22:01   ` Junio C Hamano
2023-04-18 14:32     ` Derrick Stolee
2023-04-17 22:52   ` Taylor Blau
2023-04-17 16:21 ` [PATCH 4/4] fsck: validate .rev file header Derrick Stolee via GitGitGadget
2023-04-17 21:37 ` Junio C Hamano [this message]
2023-04-18 15:23 ` [PATCH 0/4] git fsck: check pack rev-index files Taylor Blau
2023-04-18 16:59   ` 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=xmqqa5z6jilb.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=derrickstolee@github$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitgitgadget@gmail$(echo .)com \
    --cc=me@ttaylorr$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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