Re: [PATCH v2 2/6] midx-write: put failing response value back
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 3, 2025, 10:15 UTC
- Message-ID
- <aLgVLMnbGiUAviXZ@pks.im>
- In-Reply-To
- <a1dd3ed87437322e298bb192fbfe4a9641d1356e.1756589007.git.gitgitgadget@gmail.com>
On Sat, Aug 30, 2025 at 09:23:23PM +0000, Derrick Stolee via GitGitGadget wrote:
Show 11 quoted lines
> diff --git a/midx-write.c b/midx-write.c
> index 070a7f61f4..0f1d5653ab 100644
> --- a/midx-write.c
> +++ b/midx-write.c
> @@ -1104,6 +1104,7 @@ static int write_midx_internal(struct repository *r, const char *object_dir,
> m = m->base_midx;
> }
> } else if (ctx.m && fill_packs_from_midx(&ctx)) {
> + result = 1;
> goto cleanup;
> }Would it make sense to also convert this command to return negative error codes?
Show 13 quoted lines
> diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh > index 49705c62a2..008e65c22e 100755 > --- a/t/t5319-multi-pack-index.sh > +++ b/t/t5319-multi-pack-index.sh > @@ -1100,7 +1100,10 @@ test_expect_success 'load reverse index when missing .idx, .pack' ' > mv $idx.bak $idx && > > mv $pack $pack.bak && > - git cat-file --batch-check="%(objectsize:disk)" <tip > + git cat-file --batch-check="%(objectsize:disk)" <tip && > + > + test_must_fail git multi-pack-index write 2>err && > + grep "could not load pack" err
Nit: this should probably use `test_grep`.
Patrick