summaryrefslogtreecommitdiff
path: root/midx.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-12-08 23:11:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-08 23:11:18 (GMT)
commit6bac6a1ef9e9c2bcf6f927e2e58e66ef39659e93 (patch)
treec057a0c62c6c55a57dd52b18e40b6655646028e1 /midx.c
parent1bc550effee121c930e877fed3b9dc20935959de (diff)
parent506ec2fbda5334c4fc60fbd9f425fff3916a2066 (diff)
downloadgit-6bac6a1ef9e9c2bcf6f927e2e58e66ef39659e93.zip
git-6bac6a1ef9e9c2bcf6f927e2e58e66ef39659e93.tar.gz
git-6bac6a1ef9e9c2bcf6f927e2e58e66ef39659e93.tar.bz2
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 da03c14..79c282b 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];
/*