🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2351

Re: [PATCH] describe: count the distance correctly when commit dates are skewed

#2351
From: Junio C Hamano
Date: Wed, 04 Nov 2026 18:17
39 lines
14599 bytes
Kristofer Karlsson <krka@spotify.com> writes:

> What remains is knowing when to stop.  With the queue ordered by
> generation number, as in Linus's patch, that is exact for commits in
> the commit-graph.  For commits outside of it, it is exact as long as
> no commit is dated more than some epsilon before one of its own
> ancestors.  That is a sufficient condition, not a necessary one: on
> linux.git the worst such case since v6.0 is about 60 days, but a

Unbelievably bad clock skew.  I wonder if these people do not check
their machine clock at all, but knowing the answer to that or learning
why they don't would not help the issue at hand at all, so I'll stop.

> miscount also needs the skew to be right where the walk stops, and
> an epsilon of a week gave exact depths for every commit I tried,
> including the ones right around the skewed spots, at no measurable
> cost.
>
> A nice property is that this also works well with a partial
> commit-graph.  The commits outside of it are visited first, and only
> those rely on the epsilon; once the walk reaches the commits in it,
> it can stop as soon as the depths are final.  So the commit-graph
> does not need to be fully up to date to help, much like with other
> walks that use generation numbers.
>
> For 2a500a04d6f9 it gives v7.3-19059 with and without a
> commit-graph, in about the same time as master, and it matches
> "rev-list --count" on the ~450 commits of the last merge window.
> Both expected failures in t6120 pass with it, with and without
> GIT_TEST_COMMIT_GRAPH.  The change is about 120 lines added and 60
> removed in builtin/describe.c.
>
> Would this be worth pursuing, either instead of or on top of
> Linus's patch?  If so, I would be happy to clean it up and send it.

Sounds interesting to me.

Thanks.
Technical Details
Message-ID: <xmqqv76c1mwb.fsf@gitster.g>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74470-linux-kernel-git=dewy.ru
References: <20261031065525.19883-2-torvalds@kernel.org> <auiGP4XhObUzC9vD@pks.im> <CAHk-=wijLfduoJyOM+AW6FS6c02cuEFRAuQWLE+uf7SGhj8jXA@mail.gmail.com> <aumKXUS7_x0i7ZU1@pks.im> <xmqq5wyd4epv.fsf@gitster.g> <CAL71e4PqEQkGoont3tL5wJWd1_itsaaxfX+DOkLj64x-S7xR1A@mail.gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74470-linux-kernel-git=dewy.ru
From: gitster@pobox.com (Junio C Hamano)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] describe: count the distance correctly when commit
 dates are skewed
Date: Wed, 04 Nov 2026 10:17:56 -0800
Organization: Usenet Network
Message-ID: <xmqqv76c1mwb.fsf@gitster.g>
References: <20261031065525.19883-2-torvalds@kernel.org>
	<auiGP4XhObUzC9vD@pks.im>
	<CAHk-=wijLfduoJyOM+AW6FS6c02cuEFRAuQWLE+uf7SGhj8jXA@mail.gmail.com>
	<aumKXUS7_x0i7ZU1@pks.im> <xmqq5wyd4epv.fsf@gitster.g>
	<CAL71e4PqEQkGoont3tL5wJWd1_itsaaxfX+DOkLj64x-S7xR1A@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: usenet.network;
	logging-data="3458391"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:X5IHV087nEIEeLJ1/12Q+R76Xm0= sha256:FCbzplwRDXEIKWW8BJ5TOZreQNkv/JT1huW64niK4T4=
	sha1:euKAYTqRtqQJqb7KRyDfvQvo2r8= sha256:3dX8V44JyxVASZW/pjm/BE4mNXycOxTwfoajxsYiDQY=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id B4078112CE7; Wed,  4 Nov 2026 21:47:12 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.95
X-Spam-Status: No, score=-1.95 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=pobox.com header.b=Uo+JsuU3; dkim=pass (2048-bit key)
	header.d=messagingengine.com header.b=4PqFx+AF
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id c2uNkzEgQdVN;
	Wed,  4 Nov 2026 21:47:09 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-74470-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=pobox.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 8911F112CE5; Wed,  4 Nov 2026 21:46:53 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id A551D37E73; Wed,  4 Nov 2026 18:18:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793816280;
	b=uWouquh+DoJkigHgynUTdTqVYud19Aq12yQm3FW82wpQZwba7uPaR5kWQniZvv0CcqmA
	 SuM7/8/xBS2ep3KIWkt4EjeBp+iFXa+sqrXHhhzcvZwarm/9Dcp0+juKMensYK4xaQy3j
	 fD/rS1Ph0/Lpoumtzdapjx4XSaA/magJPiodgDIF933Y9SHKgyuJkKKrhXPFVHjodxJeR
	 HCn9jQpOJCbRoYoGPKo+D+ZKPEIEBl/syAzxf3hIu3TyNplGnOwdzLqalZ/5ILBTozZAm
	 tAai88iyDcg3xGt0DHrWbrn3YsKtpBqLpSWQll2wIeZDM11POUdl4A4sq3D2vW6FYLg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793816280;
	h=X-Original-To:Received: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:From:To:Cc:Subject:In-Reply-To:
	 References:Date:Message-ID:User-Agent:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type;
	bh=ecYPN6GtMRuHvfLAAqqO5g9yPrGk92pTju+gNmacND0=;
	b=z7ySWgHrxhxOyL9RBS5EXYdNLN8ZjAoGCuvHr3Yj/OCIcnz1L5YRkb2nd1xFz8xxE5w1
	 g8csxJu5TyWJd0bgtJ9nr9ixCqUjgtwcBkwFOkYa22pPCaUxKtwa5oqAZQ7+iuwPNBbcH
	 2SfnNoaJDPRF0QfO1Bj74SZwKoiXxKiTZCToqcAp6Y6hbUJMlHziXC6M7oa/MLhSc4q0D
	 rW4A3daowrOMMy4asYzZ529CjxN5J5711cLhQ203frHti9AVm/huJ/JyAdceLnlrK8vXB
	 KOx7ZEG61FYQgF6V/zyPB8G/ucKnR2MmLsRsCKHicIqNYXSer4ROitm/ShsDNm35Gvg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b=Uo+JsuU3;
	dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=4PqFx+AF;
	dmarc=pass header.from=pobox.com;
	spf=pass smtp.mailfrom=pobox.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D290606A330;
	Wed,  4 Nov 2026 18:18:00 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b=Uo+JsuU3;
	dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=4PqFx+AF
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.159
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793816279;
	b=WZIZ1MShK840KN/sDLCTAryBGC9+e07Udw3kfK3D4erTFbtSu7tekw7pgoHjldjMSe9b
	 luDYEWLkSVb6Ia3zgJzZ9mBAPV0m4d8Ur/ysMIHuWmBEEXsSfKsqfwgAqV0GRQGpcb3Rg
	 MRMDwzWm5CRfsQl+TDsyYcXx1wCIhtvwDHWfQBws/P9pIB5c3NxI3nlcTY50i0+r9Hawm
	 0Nuzyl1X+mfi/ifERvUC8OGQH5NfA8fgXh9Nbyl/PjkOWNkR6/StOVR5Fi6xPRYdMT4Ds
	 3Zwk+6RjO7g9TQ+aV71+corsTayN6KNilMKnbGS8TFucmi4aXUqnqKDABg30AQKnXVA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793816279;
	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:From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 User-Agent:MIME-Version:Content-Type;
	bh=ecYPN6GtMRuHvfLAAqqO5g9yPrGk92pTju+gNmacND0=;
	b=sNeCdzh3oaYxs32WgAiqlMEHqHNTee2XbwBmmdu7M0RvSoNj0k/lLPDlDAdtPiZOM7cX
	 u+nzxNLqziZ6ViBiDU3UmwIfUqszrD3iAqY8XEPlBfV6u3XQWXWNEyZ9S5L6sT84k2U+Z
	 mWP1KUs88PfCWITTZpNAMHaCgcuYb7sTvYzdb0fcJUAatD8S9+A6kXhsYf2c9wyJXgCVr
	 dDbl9hWqQS6cSegdF0yd1Fy+ErXCbujQq909GS5lkRE20YsEUWBotOEDSkfouEAPAd5Gc
	 RJYrm2Jr5pC3RAyQPLcZ1A5oUu09EzR5/xgis+w+8mUJ5WyWYzTCm/Snp3LRWx24COg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=pobox.com;
	spf=pass smtp.mailfrom=pobox.com;
	dkim=pass header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b=Uo+JsuU3;
	dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=4PqFx+AF;
	arc=none smtp.remote-ip=103.168.172.159
X-Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9597606A31B
	for <git@vger.kernel.org>; Wed,  4 Nov 2026 18:17:58 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A9597606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
X-Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])
	by mailfhigh.phl.internal (Postfix) with ESMTP id DF82B140016F
	for <git@vger.kernel.org>; Wed,  4 Nov 2026 13:17:57 -0500 (EST)
X-Received: from phl-frontend-02 ([10.202.2.161])
  by phl-compute-05.internal (MEProxy); Wed, 04 Nov 2026 13:17:57 -0500
X-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=fm2; t=1793816277; x=1793902677; bh=ecYPN6GtMR
	uHvfLAAqqO5g9yPrGk92pTju+gNmacND0=; b=Uo+JsuU3zC8917eciyxU8jzQz0
	oYNy1POLfOzZcLTMAOlddZD5xZVHMZaiJ6IRjoCPC7gNDWCsNWkwSVJcxTA47rOo
	MDQDvASVnrKwO/lrqv2+iihLbNlLgfBNNA8T9Ar4POJF3QVpQYs1poZBeT7C9+69
	mC7wQLkVZZe0OZADaOR0SgIiV4LkMIGVWeQGFnYD0EgvrE7yfdsqjA9oxxCWvWjk
	jeIdyH3eUeysRVsR/EwyziNP4XqmWIqjNiE8aA35j3rul2V+YDglNtKNk3P+JzUQ
	nJsBaR6EhCXqKrJ6ViVNZdvwO3AQcBK0XF5pIz9AEBppmc1T1FyBJU09EOww==
X-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=
	1793816277; x=1793902677; bh=ecYPN6GtMRuHvfLAAqqO5g9yPrGk92pTju+
	gNmacND0=; b=4PqFx+AF2XPy5gc4Vx7h2cUspXZOIGx5+hv45sE2J6rYyYA7QG+
	qIa+uqtMl+bRUcp4AHzAXv3B57nWCGG/NWR31kVG8LozuulCzn6QaKG7pvT5Jb1G
	2AFBK+0Kx0gOCM71d6P8PQMofRRI0KDhFFvcMcMi93yM3OIE4PyolzLi0dBE5XGM
	WlU/tFHZnEBGElwmu1K8335dwzVQn4YJ97Kqn7Rlr07+N2g5SapPmMz5Dzlaj2wx
	zdV3EZ/GY7f4Ye0NyKGlyzLGFftETvI2WOgnHiLRi71/3pqf8PHOjPoR/lJTb8qB
	LQCUAJEvwPbXHKDt/MzuYl3APJiN2JDwDQg==
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-08;
	repo=github.com/dkim2wg/interop; date=2026-10-28; sw=lmtpprox;
	action=sign d=pobox.com a=rsa-sha256;
X-DKIM2-Signature: i=1; m=1; t=1793816277; d=pobox.com;
	mf=PGdpdHN0ZXJAcG9ib3guY29tPg==;
	rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+;
	s=fm2:rsa-sha256:ZSR1yaEgGKLlRvaLaZGjq7i5dT5/eeHNVdTHntltI0lUsXw
	jh4yCBcy73dnHO+NaJZDRBWly6IkwTVBZKNus8LzoZrTbqmQ5UM6kh16zepA3uTD
	8LRaLvHyuU3PZ4iDMU+Lf9h/HumoaTeaNSo0kp5lgMM7pz4kC7YtpjJ8RMhuptFh
	3sDB2MSPnjQBUY+qi89RDdg5zIvIHr5LFwR3XPo9p2Hu6YML62XgnHx0kuD0ZClx
	mlWoO8Y8ECtTP5ECsfC7Eu0K74uICF5ytyqQfpYWT5L9FXquG9LsZIqEbb8Bb2yx
	PjcbUDA4HCrspNgkuqB6lE4Fq9tnsx2sdoxUlug==;
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-08;
	repo=github.com/dkim2wg/interop; date=2026-10-28; sw=lmtpprox;
	action=mi-m=1; hc=12;
	hn=cc,content-type,date,feedback-id,from,in-reply-to,message-id,
	mime-version,references,subject,to,user-agent;
X-Message-Instance: m=1; h=sha256:sTKvl4SIiucgF+ZlLqDhUQfxm4rWWAEl2t9Rew/6QMc=:xE1ANoby7+1xpj/vQ2hL31+8/dSlUxMtTYTfALBPnhE=;
X-ME-Sender: <xms:1Xbrap2S2KmrhfZJ5MiHoswwjkjMpFIDgyYDZlHcELHVnkMrxb3fmg>
    <xme:1Xbram9h2E45diIp6dc8EYPeu7uG8qFVArLf1OJye5MVvdGQB8e1gl9wsTcuwnsT5
    CTGHgU9uxp0ooun8DuPgdExJ6wHaxitFDZtoOVrEL6jB1-cSuaO1Os>
X-ME-Received: <xmr:1XbraiPJEbFzVDCVRFJ_gzt0n940KFZNzAPZcxlegwl54qFhYKNW0B2WvX34hLFFMYyzagbb2Hn9xu-2uaDeO8MAqo5tDBFowPb->
X-ME-Proxy-Cause: dmFkZTGIOlRc3qDpqQBJAOOg/HxP2PLKkBQWiUH7cZG/+6x6P3AIoDbtJ4vGFyJ3H827pb
    tVfwXhoxAzYCms+Y7VjVcAzR+oqP0OCMcmLThbG45XXMrnjiHn4iRW597QgMslAzReWb0S
    LRmZAaDouW2BexTVlTurtDQQZCuIcGU2GdhbsgCD5HS/vapciklRX55pQoTnVvTlZtV3jg
    cHNBLd5XwjV83S2nGVT1FC+XhtR/5+tRlfarsMWbjNFJUwqxl9HU8vc4Rk5vQjYdCUy1af
    e6DQzOo/5pmHASg3YRSEWMBwO8+jdkVVpMhFySSRhVWr8b6Ba3xUm8ba0viqZUzJzBBkRX
    UkQKfRGlHiqW2CXGKPfQYAEt5VPxXQRBTG0Ru5T2GPQuUbeNavhZ/6cUjIMM6+RSL6ajwO
    pg5/CK9qVxF27DHGyOoUQb5rm3fTvxAHAqHHK9kinvfXdAvj/TAfobd5cz4CumX3OKS3qB
    UVLH9j1gJF9eM9T/di67HPlMDcC7Ii5Bs7EwvkSMtnREe2Vk8g6NjlLmUei+iBg9sNf/+Z
    n8daizCBhZs3pBm2Wlt5bldZbyV4qeAWYWWTBreG+0yd2xmEukM2UzWVdb0OaUhYWUba3h
    dIelcYsEN7ofaE2m055YIBx+WlN5TUyVQkT30vEOOevB0Af2rX+7/iE31Mow
X-ME-Proxy: <xmx:1XbraidALatyhIquTodbK377_fcaCup3435LKZ_0SJ4aizH3uWmOJw>
    <xmx:1XbrapUX8bThMXpH-xoNqv2svvClH3drHoV9VFjTdbWvr4DdVnw6ZA>
    <xmx:1XbraihCL52ixW1FvrKhmdYxtwc80Ks3BPJbcaFVwXO3lVjEfUHZWQ>
    <xmx:1Xbrag9jqGWPETsdLhzIzsm4OjIgrhAjNiyAfN48lCPsPR60gdssNg>
    <xmx:1Xbraj7JfAUxYFJHzwNTUrtwcmMX3XnTmHlrqmK2itUPHwDlb5-_GHmI>
X-Feedback-ID: if26b431b:Fastmail
X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 4 Nov 2026 13:17:57 -0500 (EST)
X-Cc: Patrick Steinhardt <ps@pks.im>,  Linus Torvalds
 <torvalds@linux-foundation.org>,  git@vger.kernel.org
X-In-Reply-To: <CAL71e4PqEQkGoont3tL5wJWd1_itsaaxfX+DOkLj64x-S7xR1A@mail.gmail.com>
	(Kristofer Karlsson's message of "Wed, 4 Nov 2026 12:01:58 +0100")
X-User-Agent: Gnus/5.13 (Gnus v5.13)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list