Re: [PATCH 09/11] multi-pack-index: verify object offsets
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Sep 7, 2018, 00:34 UTC
- Message-ID
- <CAPig+cQKt4sq4bhRUoGJMV=GxHzx-AtD_5J7DNtfMngH-uJRFQ@mail.gmail.com>
- In-Reply-To
- <e1498aea45eb46feb3664413f49b70bdf048d284.1536158789.git.gitgitgadget@gmail.com>
On Wed, Sep 5, 2018 at 10:46 AM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 11 quoted lines
> Replace the BUG() statement with a die() statement, now that we
> may hit a bad pack-int-id during a 'verify' command on a corrupt
> multi-pack-index, and it is covered by a test.
>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
> diff --git a/midx.c b/midx.c
> @@ -197,7 +197,7 @@ int prepare_midx_pack(struct multi_pack_index *m, uint32_t pack_int_id)
> if (pack_int_id >= m->num_packs)
> - BUG("bad pack-int-id");
> + die(_("bad pack-int-id"));For someone trying to diagnose this issue, would it be helpful to know (that is, print out) the values of pack_int_id and num_packs?