midx-write: put failing response value back

This instance of setting the result to 1 before going to cleanup was
accidentally removed in fcb2205b77 (midx: implement support for writing
incremental MIDX chains, 2024-08-06). Build upon a test that already deletes
a packfile to verify that this error propagates to full command failure.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Derrick Stolee
2025-09-05 19:26:14 +00:00
committed by Junio C Hamano
parent c9388d9012
commit 3a45c7beb0
2 changed files with 5 additions and 1 deletions

View File

@@ -1122,6 +1122,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;
}