Subject: [PATCH v2 0/3] prevent opening packs too early

From: Taylor Blau <[email-masked]>
Date: Wed, 8 Sep 2021 18:17:14 -0400

Here is a very small reroll of a couple of patches to make sure that packs are
not read before all of their auxiliary files exist and are moved into place, by
renaming the .idx file into place last.

New since the original version is a patch to apply similar treatment to
index-pack, as noticed by Peff in [1]. This should be queued before Ævar's
series on top.

[1]: https://lore.kernel.org/git/[email-masked]/

Taylor Blau (3):
  pack-write.c: rename `.idx` files into place last
  builtin/repack.c: move `.idx` files into place last
  builtin/index-pack.c: move `.idx` files into place last

 builtin/index-pack.c | 16 ++++++++--------
 builtin/repack.c     |  2 +-
 pack-write.c         | 12 ++++++------
 3 files changed, 15 insertions(+), 15 deletions(-)

Range-diff against v1:
1:  ea3b1a0d8e ! 1:  cb3a843994 pack-write.c: rename `.idx` file into place last
    @@ Metadata
     Author: Taylor Blau <[email-masked]>
     
      ## Commit message ##
    -    pack-write.c: rename `.idx` file into place last
    +    pack-write.c: rename `.idx` files into place last
     
         We treat the presence of an `.idx` file as the indicator of whether or
         not it's safe to use a packfile. But `finish_tmp_packfile()` (which is
2:  a6a4d2154e = 2:  925f9ada2a builtin/repack.c: move `.idx` files into place last
-:  ---------- > 3:  460b7b9151 builtin/index-pack.c: move `.idx` files into place last
-- 
2.33.0.96.g73915697e6