aboutsummaryrefslogtreecommitdiff
path: root/midx.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-01-13 05:21:09 -0800
committerJunio C Hamano <gitster@pobox.com>2026-01-13 05:21:09 -0800
commitcc06d7e7ffa08c1907a7e5cf2a095f4a890962a4 (patch)
tree5128c927a5fb042b5b36b91ae7beaf3e056e2c2c /midx.c
parent9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff)
parent6ce9d558ced275a707393d044e5b0035412f8360 (diff)
downloadgit-cc06d7e7ffa08c1907a7e5cf2a095f4a890962a4.tar.xz
Merge branch 'ps/repack-avoid-noop-midx-rewrite' into tb/midx-write-corrupt-checksum-fix
* ps/repack-avoid-noop-midx-rewrite: midx-write: skip rewriting MIDX with `--stdin-packs` unless needed midx-write: extract function to test whether MIDX needs updating midx: fix `BUG()` when getting preferred pack without a reverse index
Diffstat (limited to 'midx.c')
-rw-r--r--midx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/midx.c b/midx.c
index 1d6269f957..79c890cf1b 100644
--- a/midx.c
+++ b/midx.c
@@ -688,7 +688,7 @@ int midx_preferred_pack(struct multi_pack_index *m, uint32_t *pack_int_id)
{
if (m->preferred_pack_idx == -1) {
uint32_t midx_pos;
- if (load_midx_revindex(m) < 0) {
+ if (load_midx_revindex(m)) {
m->preferred_pack_idx = -2;
return -1;
}