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_MED, 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 F281B1F5AE for ; Tue, 11 May 2021 01:35:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbhEKBg2 (ORCPT ); Mon, 10 May 2021 21:36:28 -0400 Received: from cloud.peff.net ([104.130.231.41]:49950 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230361AbhEKBg1 (ORCPT ); Mon, 10 May 2021 21:36:27 -0400 Received: (qmail 20459 invoked by uid 109); 11 May 2021 01:35:20 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 11 May 2021 01:35:20 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 17597 invoked by uid 111); 11 May 2021 01:35:21 -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; Mon, 10 May 2021 21:35:21 -0400 Authentication-Results: peff.net; auth=none Date: Mon, 10 May 2021 21:35:19 -0400 From: Jeff King To: Will Chandler Cc: Junio C Hamano , git@vger.kernel.org, ps@pks.im Subject: Re: [PATCH] refs: cleanup directories when deleting packed ref Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Sat, May 08, 2021 at 01:00:43AM -0400, Will Chandler wrote: > Subject: [PATCH v2] refs: cleanup directories when deleting packed ref > > When deleting a packed ref via 'update-ref -d', a lockfile is made in > the directory that would contain the loose copy of that ref, creating > any directories in the ref's path that do not exist. When the > transaction completes, the lockfile is deleted, but any empty parent > directories made when creating the lockfile are left in place. These > empty directories are not removed by 'pack-refs' or other housekeeping > tasks and will accumulate over time. > > When deleting a loose ref, we remove all empty parent directories at the > end of the transaction. > > This commit applies the parent directory cleanup logic used when > deleting loose refs to packed refs as well. This thread got off on a tangent about threads, but to get back to the main idea: this v2 patch looks good to me. Thank you very much for finding and fixing it. Regarding threads, I agree with everything Junio already said. My only suggestion would be to make sure the "Subject" above becomes the actual email subject, rather than an in-body header (that may be what confused the b4 tool, but more importantly, threaded readers like mutt will show the changed subject in the thread index, making it very clear at a glance that there is a v2 and not just more discussion). -Peff