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

Re: [PATCH 0/4] git fsck: check pack rev-index files

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 17, 2023, 21:37 UTC
Message-ID
<xmqqa5z6jilb.fsf@gitster.g>
In-Reply-To
<pull.1512.git.1681748502.gitgitgadget@gmail.com>
"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.
Show 5 quoted lines
> 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.
Show 6 quoted lines
> 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 ;-)
Previous: Derrick Stolee via GitGitGadgetNext: Taylor Blau
Message 17 of 19 in “git fsck: check pack rev-index files”
  1. 0/4 git fsck: check pack rev-index filesDerrick Stolee via GitGitGadget, Apr 17, 2023
  2. 1/4 fsck: create scaffolding for rev-index checksDerrick Stolee via GitGitGadget, Apr 17, 2023
  3. Taylor BlauApr 17, 2023
  4. 2/4 fsck: check rev-index checksumsDerrick Stolee via GitGitGadget, Apr 17, 2023
  5. Junio C HamanoApr 17, 2023
  6. Derrick StoleeApr 18, 2023
  7. Taylor BlauApr 17, 2023
  8. Derrick StoleeApr 18, 2023
  9. Taylor BlauApr 18, 2023
  10. Derrick StoleeApr 18, 2023
  11. Taylor BlauApr 18, 2023
  12. 3/4 fsck: check rev-index position valuesDerrick Stolee via GitGitGadget, Apr 17, 2023
  13. Junio C HamanoApr 17, 2023
  14. Derrick StoleeApr 18, 2023
  15. Taylor BlauApr 17, 2023
  16. 4/4 fsck: validate .rev file headerDerrick Stolee via GitGitGadget, Apr 17, 2023
  17. Junio C HamanoApr 17, 2023
  18. Taylor BlauApr 18, 2023
  19. Junio C HamanoApr 18, 2023

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.