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

Re: [PATCH 04/11] multi-pack-index: verify packname order

From
Derrick Stolee <stolee@gmail.com>
Date
Sep 5, 2018, 19:28 UTC
Message-ID
<e09aa8e6-26fa-68b5-b4d1-1322b09e7974@gmail.com>
In-Reply-To
<CAGZ79kZHmCyRLur=DgLx2sHhD1hCXn3pU+0CggwFQgWRzTkp5A@mail.gmail.com>
On 9/5/2018 3:14 PM, Stefan Beller wrote:
Show 26 quoted lines
> On Wed, Sep 5, 2018 at 12:11 PM Derrick Stolee <stolee@gmail.com> wrote:
>> On 9/5/2018 2:15 PM, Stefan Beller wrote:
>>> On Wed, Sep 5, 2018 at 7:46 AM Derrick Stolee via GitGitGadget
>>> <gitgitgadget@gmail.com> wrote:
>>>> From: Derrick Stolee <dstolee@microsoft.com>
>>>>
>>>> The final check we make while loading a multi-pack-index is that
>>>> the packfile names are in lexicographical order. Make this error
>>>> be a die() instead.
>>> What is the advantage of having a die() here?
>>> Would the midx work under normal operation when
>>> not sorted correctly?
>>>
>>> This sounds like a hack for easy testability in this context,
>>> so could you clarify why this helps the regular user?
>> The multi-pack-index will not work as expected, since
>> midx_contains_pack() may provide incorrect results, and thus we will add
>> the "missing" packfiles to the packed_git linked list.
>>
>> This _should_ be a die(), as something unexpected occurred (the file
>> doesn't match the format specification).
> Thanks for the clarification.
>
> So this patch actually hits 2 birds with one stone, as it fixes
> a bug as well as adds the check for such corruption to the
> verify step?

This is a common occurrence in this series (replacing error() with die()) as we are now exercising those conditions and clarifying what should happen.

Previous: Stefan BellerNext: Derrick Stolee via GitGitGadget
Message 11 of 34 in “Add 'git multi-pack-index verify' command”
  1. 00/11 Add 'git multi-pack-index verify' commandDerrick Stolee via GitGitGadget, Sep 5, 2018
  2. 01/11 multi-pack-index: add 'verify' verbDerrick Stolee via GitGitGadget, Sep 5, 2018
  3. Eric SunshineSep 5, 2018
  4. Derrick StoleeSep 5, 2018
  5. 02/11 multi-pack-index: verify bad headerDerrick Stolee via GitGitGadget, Sep 5, 2018
  6. Eric SunshineSep 7, 2018
  7. 04/11 multi-pack-index: verify packname orderDerrick Stolee via GitGitGadget, Sep 5, 2018
  8. Stefan BellerSep 5, 2018
  9. Derrick StoleeSep 5, 2018
  10. Stefan BellerSep 5, 2018
  11. Derrick StoleeSep 5, 2018
  12. 05/11 multi-pack-index: verify missing packDerrick Stolee via GitGitGadget, Sep 5, 2018
  13. 06/11 multi-pack-index: verify oid fanout orderDerrick Stolee via GitGitGadget, Sep 5, 2018
  14. 07/11 multi-pack-index: verify oid lookup orderDerrick Stolee via GitGitGadget, Sep 5, 2018
  15. 08/11 multi-pack-index: fix 32-bit vs 64-bit size checkDerrick Stolee via GitGitGadget, Sep 5, 2018
  16. 03/11 multi-pack-index: verify corrupt chunk lookup tableDerrick Stolee via GitGitGadget, Sep 5, 2018
  17. 09/11 multi-pack-index: verify object offsetsDerrick Stolee via GitGitGadget, Sep 5, 2018
  18. Eric SunshineSep 7, 2018
  19. Derrick StoleeSep 7, 2018
  20. 10/11 multi-pack-index: report progress during 'verify'Derrick Stolee via GitGitGadget, Sep 5, 2018
  21. 11/11 fsck: verify multi-pack-indexDerrick Stolee via GitGitGadget, Sep 5, 2018
  22. 00/11 Add 'git multi-pack-index verify' commandDerrick Stolee via GitGitGadget, Sep 13, 2018
  23. 02/11 multi-pack-index: verify bad headerDerrick Stolee via GitGitGadget, Sep 13, 2018
  24. 03/11 multi-pack-index: verify corrupt chunk lookup tableDerrick Stolee via GitGitGadget, Sep 13, 2018
  25. 04/11 multi-pack-index: verify packname orderDerrick Stolee via GitGitGadget, Sep 13, 2018
  26. 05/11 multi-pack-index: verify missing packDerrick Stolee via GitGitGadget, Sep 13, 2018
  27. 06/11 multi-pack-index: verify oid fanout orderDerrick Stolee via GitGitGadget, Sep 13, 2018
  28. 07/11 multi-pack-index: verify oid lookup orderDerrick Stolee via GitGitGadget, Sep 13, 2018
  29. 08/11 multi-pack-index: fix 32-bit vs 64-bit size checkDerrick Stolee via GitGitGadget, Sep 13, 2018
  30. 09/11 multi-pack-index: verify object offsetsDerrick Stolee via GitGitGadget, Sep 13, 2018
  31. 10/11 multi-pack-index: report progress during 'verify'Derrick Stolee via GitGitGadget, Sep 13, 2018
  32. Ævar Arnfjörð BjarmasonSep 13, 2018
  33. 11/11 fsck: verify multi-pack-indexDerrick Stolee via GitGitGadget, Sep 13, 2018
  34. 01/11 multi-pack-index: add 'verify' verbDerrick Stolee via GitGitGadget, Sep 13, 2018

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.