From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.153 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796315384; b=FOqPzUAVp/Le2acghx4nb3zCg5Lv8UwogC9uWgAEAMSMYPJpE9VgNkk3S2JSqQnm67b8 YgT95bPu1au1u8corU/Hstf/wpb91eoJW3TUi+hsavfYGA9gd8DgGnhWV6zNHB/ntgZ6i 2KyELddfJed0ZX4HucNE1xKZ7dwvrYlWyetX7LwkQSfmsZlwn7HQdk1E8eDSROc0M5bGY QW0aW4moJOfLyycppPXh5/f8SosbH0Pipk9f4FCRh/RUZSpbOEdzGyXFr/rzkZZIKTMeq MDxyhKeBUqFXQ2sN8bikQ6ye7lXZ1xgA9zpmjTHsk5l83XEa9kpBkkywj7bIyM9BxOw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796315384; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=9XEfm4tPO0qPY9QiZ0gSpYrKWjzeMWwayohH/mOhZmw=; b=c8EVLzmTv6vmEab3V6g2T3PztlyQRP6pS4CBopYk7nMjDu2eyb9n8TcxSr3cGL6AFwFi Kmofx5dtr+sAqYggxGlmr2NXZ9cu7GHTAr7osF+11NIraLEr+Sh1L85U6319fVLJyUNMW Q4Igur96UzXZt/UpL8bjiCwuM2vb+8UvgoE3Br2LD797iTXXQZvef/eNt1voOSt5ZIQ8z MsJBncFRP6CU6SmmyuQ+bwXpI27K8OWE16ncUeltRTId4m8vUzBY8C/DvU5gD/pYK8SKS xK3SJrXg5KT+avL7+oNqWm+1PbJy42mrp6xrl65ih3VEr8PTZ0sOUQj+TPooCfuon6A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=u1RwMe1k; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b="5ceK/LAg"; arc=none smtp.remote-ip=103.168.172.153 Received: from fhigh-a2-smtp.messagingengine.com (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFB7C606A322 for ; Thu, 3 Dec 2026 16:29:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DFB7C606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=u1RwMe1k; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=5ceK/LAg Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 0683C14000DF for ; Thu, 3 Dec 2026 11:29:43 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Thu, 03 Dec 2026 11:29:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1796315382; x=1796401782; bh=9XEfm4tPO0 qPY9QiZ0gSpYrKWjzeMWwayohH/mOhZmw=; b=u1RwMe1kLmP1qAPc+8b0uALkE+ aZp0HMysYmvvhJWg3W8wD6pBavC+cZ0xAJjJ1r66XCuoCXPR9Dk1TTy3j2uYuC+S mc8r2vxp/5h1pElm5TpPWfmdw58LYVvglx5lMDtSKu+XvlTos6xjnb49fybG5pZw EgL5Fm6kmicP58i4JnQNngVxTbCUd3bx6kBP/4cjn0qu6gLkMXxq2W4mda0skgrE IWnoT/QDzA74eubG8Dfeq/Iog0g4foW1NpKe93oXmGnwexKsN2ji6CUwK2YaMWOy wvkFlPzqQHIr2O9A2YmBPzcXgOAbHSHQkM3KJRpD3VkPmBKW5X5rnsGYaK7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1796315382; x=1796401782; bh=9XEfm4tPO0qPY9QiZ0gSpYrKWjzeMWwayoh H/mOhZmw=; b=5ceK/LAggXZUZ/K88QaZRI3oHtlTIwerFR4EAzdflbdu4vU9OQQ 85OkuBQ7PMrKplXjeVs3Hn7j1GkNcAjCfpoCvLDrUuZzKhAlNzYCHLsS24l66don HGG344f6j1rgv5tISnKn0KqYfYNtYal4GiIygg7kJsst1BEGKHttaCikHslpokcL EWgLjMuNYwWc11bq5WRo+ruhiUO/clqaEs2d0k7FtkrQ5bOLKsnlKGKmP2sF3F4g LHHeihlXZnBMpZfFKLXfc3E8eCDq7O8ejsUVpCWv0tU7nUD2xlDyRsplJsH8sKWr GrcnBHoJlW+JLJbA+44QREf5vVxRbzliL4Q== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=pks.im a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796315382; d=pks.im; mf=PHBzQHBrcy5pbT4=; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:UV/4xUmWXbfjsBTt2oGzszv10WkNN9Dxyr5FzwVpX/QMGov fAnWmSGrsmJi6LS87p/ozxNAYN9zsqYO+/tObcHOyFOHhZLFil85MFyIQqwdNDGA ifcWn3Mbx/eY1rdlai1ApSGY6yxIzHidMrazVniU1IZej6Ze0LPVCf3HJl+mKogN ay0EnOIe73WtKJkj0OrgpqVxmG47ZxnbF0vQKz0hzoa/lOLpe1UTpkDo36405jAu bIe9PsRpDXKRaIpk/GANha2a4/ah6bJ6jhe84ctEk4A4hYriuIA30VCybaluDMHx 5g2wB1I/LDDJpGQGMB+OG2XS+q2joLAFztkE0bA==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:jZ5h8CUJw0BZ5oPT4NvSSkWQcqzMQVn+QGPyrVZC6cI=:2rQDKlYss3MEtqwW4C+XSnd6+W/TFXsRLSoBXiqmWEQ=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEzrLTQ5XcMsOTHsw5IpLchTtpJre9eTdU/LjWvL+euP5Dx976JcPxsy4Cov0ay2S yGxfFxdvJ8UCv6iILkZIACwnWfA5KerBCKntUIPx5qwm0fW/gCxBmMN8FFhzHpTugqQzoW 25OSNaaWF0hSdV9NH2wVX0wjA9ITNqMxa69CcaoW6cUAF61asH99EvriCMADEhu+GLICHJ qSoc9aWCG4fX67DVsxNGe1I9VCChgQ0hzVaXURO+aepcleN3X33P4yMacYWlkpo5sWL20U 0pkFWL6IgNYNNZtdeTsng2AGAxl/xrKKlRv/4LOtvmMfgIbJWVSr2h1J+e7X2TtJPH17L3 roRTES7DhjQMoUlo87WwYzfXu1/Gr5h3s6WcuZcxdEM3mlRA3b8NSL4w2ErSn4XDVY8CWH Kjj5HCwP5xz67k4Li5di+V0F1T3+1Lkf8joIREJiZhla35y6f+meibJIrrfwv9XgQYr/Wy 5pqG0zP4xzmBK7oreb9ln17HjQjPjxz2sevqPTcPL0FlQEynNHz/dmnQP8RXx5Gs6orKh3 PcAQsO535hfBbofzRjlVTH+/zZeW3OmUBkzgu0lqU26AvzUC4lX6xLHNMJaIsAkvw4c0Qf CPVJk3TLScRhpSAgTwnmYzAPWCEyhgDDm99C/OGrBOU0vtvGssGqyWloF36w X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Dec 2026 11:29:41 -0500 (EST) Received: by mail (OpenSMTPD) with ESMTPSA id 46d70e63 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 3 Dec 2026 16:29:39 +0000 (UTC) Date: Thu, 3 Dec 2026 17:29:36 +0100 From: Patrick Steinhardt To: Toon Claes Cc: git@vger.kernel.org, Junio C Hamano Subject: Re: [PATCH v2 3/4] builtin/maintenance: only consider `gc.reflogExpire` for "--auto" Message-ID: References: <20261202-pks-reflog-expire-performance-v2-0-17b2d6dd4867@pks.im> <20261202-pks-reflog-expire-performance-v2-3-17b2d6dd4867@pks.im> <87ik1aqwa2.fsf@dev.null.iotcl.com.invalid> X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ik1aqwa2.fsf@dev.null.iotcl.com.invalid> On Thu, Dec 03, 2026 at 03:22:13PM +0100, Toon Claes wrote: > Patrick Steinhardt writes: > > > The "reflog-expire" maintenance task is responsible for expiring reflog > > entries that are older than either "gc.reflogExpire" for entries that > > are still reachable, or "gc.reflogExpireUnreachable" for those that are > > not reachable. > > > > When executed with "--auto", the condition that we use to trigger this > > task verifies whether the number of reflog entries that we would prune > > is larger than "maintenance.reflog-expire.auto". This is evaluated by > > walking the "HEAD" reflog, where we then check every entry by calling > > `should_expire_reflog_ent()`. That function will then check whether the > > reflog entry refers to a commit that is reachable or not, and depending > > on the outcome compares against either "gc.reflogExpire", or against > > both "gc.reflogExpire" and "gc.reflogExpireUnreachable". > > > > To decide reachability the caller has to call `reflog_expiry_prepare()`, > > which amongst other things also performs a reachability walk for a given > > refname. But we don't do that in the "reflog-expire" maintenance task, > > and hence every single reflog entry will be considered unreachable and > > thus we'd consider many reachable entries prunable even though they > > won't be pruned. So we overcount the number of prunable entries quite a > > bit and will thus trigger `git reflog expire` even though it won't do > > anything. > > > > Now we could easiliy fix that by calling `reflog_expiry_prepare()`. But > > s/easiliy/easily/ I've fixed this up locally, but will refrain from sending a new version just to fix this one typo. Thanks for your review! Patrick