From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37BEF1DF75A for ; Thu, 10 Sep 2026 00:57:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789001825; cv=none; b=MaSmKoHipUE/lIlOjIC38RCkfgOfMRT7OXl+tCdUjNmOfaS12fLlHbWoDvG/ssaGSoc6igAAQUYt1/5RCY0tuHQGuS7VJkTBjYXpbUTspIprHcbJvuMob0vd9aWF+gF1K1dGb5F3TwStBaYl4y351rL14QLrLtzZGobp5UNNK2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789001825; c=relaxed/simple; bh=+AgC4NQX3S0p3BoVx/cRXUdXwQFCgblSGF80fIRu8lE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=DgB3px9DeO7by+DRe6DOwt82AA1B3Mz3TWxkIZqMbjjz3OPft9D5Dk/FsK+H2A33XLnj8D9UOrmvgnTRuTf53sA9HDZo/qelhwBmuDII+PlS9vrQAY8jWyeUGxMEI4lt1PdJeoeDPGpsSH+3HlRIPd3CM206A/q4j8XTvCFyDeU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=pbSUyHU/; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=An4T9e/A; arc=none smtp.client-ip=202.12.124.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="pbSUyHU/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="An4T9e/A" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 5E60D1D00107; Wed, 9 Sep 2026 20:57:03 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-05.internal (MEProxy); Wed, 09 Sep 2026 20:57:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; 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=1789001823; x=1789088223; bh=T4yKrVTyyg iD5MAgg+50l5X8Q29jLwNwBCPLmQyASwc=; b=pbSUyHU/GpuFuo99z6I9Mp7SBV 6DzYiusr9JohxMbbUcUMblEnwW/23DnNAyRuILsrLEJn61RHBxr9OSZFv3cY7CTu q5/YjwCjxIyW4cQ3TDjjUGZb3PmSWefChBxUCXMu+gfRaaSpOmhKyNqz4Xfpus/j 33+JTlHpvCRmcw16GV3tD/22IwbPm0xvIa/FD8muYunGgriAsHqglj0My4ugs/p4 O0Amk8nyo5wcRuVLzL0Vy89ekD5Dgh5+fXuo+8k72J9M7ylJ7+Hdg2B3jnDRdJ/0 UI3JlDMMxgyHYtOxExWVxgp14+0V41R0uVxXgui9A9a5RYX0aLGgTz59u7Kw== 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=fm1; t= 1789001823; x=1789088223; bh=T4yKrVTyygiD5MAgg+50l5X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UUzg X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Sep 2026 20:57:02 -0400 (EDT) From: Junio C Hamano To: Aleksei Sviridkin Cc: git@vger.kernel.org Subject: Re: [PATCH v2] push: fix --force-if-includes when remote-tracking ref has no reflog In-Reply-To: <20260909065639.47316-1-f@lex.la> (Aleksei Sviridkin's message of "Wed, 9 Sep 2026 09:56:39 +0300") References: <20260903010547.85469-1-f@lex.la> <20260904124433.12840-1-f@lex.la> <20260906165052.21780-1-f@lex.la> <20260909065639.47316-1-f@lex.la> Date: Wed, 09 Sep 2026 17:57:01 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Aleksei Sviridkin writes: > Junio C Hamano writes: >> It is only true for those who conciously disable the gc, isn't it? > > No. The fallback is not about expiry, it is reached when the > remote-tracking ref has no reflog, and a plain clone leaves it that > way: after "git clone --no-local" on the files backend, "git reflog > exists refs/remotes/origin/main" returns 1, with core.logAllRefUpdates > at its default and gc untouched. The same source cloned with > --ref-format=reftable gets one entry. > > Nothing expires on a calendar either. Entries go when "git reflog > expire" runs, and "git gc --auto" decides by loose object count > (gc.auto, 6700), so a quiet repository expires nothing. Sorry but I am confused. Your sample below is with 20000 local reflog worth of activities, which is hardly a "quiet repository". Besides, we are talking about "push" so optimizing for a quiet repository does not sound like a useful mentail exercise to do. >> Doesn't it force a behaviour that would happen only to those people >> who deliberately choose to ignore cutoff and who are willing to spend >> cycles to go back to the beginning of history, to all users, >> including those who do not make such customization, no? > > Measured that. One repository, 20000 entries in the local branch's > reflog, remote-tracking ref without a reflog, both values reject the > push so only the work differs. Median of 7 runs: > > entries spread over 200 days zero 0.325s 90 days 0.069s > after "git reflog expire --all" zero 0.070s 90 days 0.069s > 20000 entries inside 90 days zero 0.319s 90 days 0.321s > > The expire run left 5 of the 20000, since all but five are 100 to 200 > days old here. So the cost lands only on a repository that still holds > entries older than 90 days, which is the one where gc has not run. > > In that repository, when the matching entry is one of the old ones, the > same walk is what decides: zero accepts in 0.322s, 90 days rejects in > 0.086s. > > With no match it is 0.26s of extra work for the same answer. Thanks. Doesn't that mean it is more logical to use the default gc expiration timeout than year 1970 and in any cases using the usual gc expiration would not waste more time than using 1970, right?