diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-12-08 15:11:18 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-08 15:11:18 -0800 |
commit | 6bac6a1ef9e9c2bcf6f927e2e58e66ef39659e93 (patch) | |
tree | c057a0c62c6c55a57dd52b18e40b6655646028e1 /midx.c | |
parent | Merge branch 'ps/update-ref-multi-transaction' (diff) | |
parent | midx.c: protect against disappearing packs (diff) | |
download | tgif-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; /* |