From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 35DF01FA13 for ; Wed, 21 Jul 2021 11:37:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239479AbhGUKp2 (ORCPT ); Wed, 21 Jul 2021 06:45:28 -0400 Received: from cloud.peff.net ([104.130.231.41]:53030 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238925AbhGUJj2 (ORCPT ); Wed, 21 Jul 2021 05:39:28 -0400 Received: (qmail 2011 invoked by uid 109); 21 Jul 2021 10:19:34 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Wed, 21 Jul 2021 10:19:34 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 2935 invoked by uid 111); 21 Jul 2021 10:19:55 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 21 Jul 2021 06:19:55 -0400 Authentication-Results: peff.net; auth=none Date: Wed, 21 Jul 2021 06:19:53 -0400 From: Jeff King To: Taylor Blau Cc: git@vger.kernel.org, dstolee@microsoft.com, gitster@pobox.com, jonathantanmy@google.com Subject: Re: [PATCH v2 07/24] midx: clear auxiliary .rev after replacing the MIDX Message-ID: References: <1448ca0d2ba265db2dce414a7f7d6b1f4bcb5a08.1624314293.git.me@ttaylorr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1448ca0d2ba265db2dce414a7f7d6b1f4bcb5a08.1624314293.git.me@ttaylorr.com> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Jun 21, 2021 at 06:25:15PM -0400, Taylor Blau wrote: > When writing a new multi-pack index, write_midx_internal() attempts to > clean up any auxiliary files (currently just the MIDX's `.rev` file, but > soon to include a `.bitmap`, too) corresponding to the MIDX it's > replacing. > > This step should happen after the new MIDX is written into place, since > doing so beforehand means that the old MIDX could be read without its > corresponding .rev file. Good catch. The patch looks obviously correct. -Peff