summaryrefslogtreecommitdiff
path: root/midx.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-12-08 15:11:18 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-12-08 15:11:18 -0800
commit6bac6a1ef9e9c2bcf6f927e2e58e66ef39659e93 (patch)
treec057a0c62c6c55a57dd52b18e40b6655646028e1 /midx.c
parentMerge branch 'ps/update-ref-multi-transaction' (diff)
parentmidx.c: protect against disappearing packs (diff)
downloadtgif-6bac6a1ef9e9c2bcf6f927e2e58e66ef39659e93.tar.xz
Merge branch 'tb/idx-midx-race-fix'
Processes that access packdata while the .idx file gets removed (e.g. while repacking) did not fail or fall back gracefully as they could. * tb/idx-midx-race-fix: midx.c: protect against disappearing packs packfile.c: protect against disappearing indexes
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 da03c1449a..79c282b070 100644
--- a/midx.c
+++ b/midx.c
@@ -298,7 +298,7 @@ static int nth_midxed_pack_entry(struct repository *r,
pack_int_id = nth_midxed_pack_int_id(m, pos);
if (prepare_midx_pack(r, m, pack_int_id))
- die(_("error preparing packfile from multi-pack-index"));
+ return 0;
p = m->packs[pack_int_id];
/*