🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1751

Re: [PATCH] refs: fix loose-ref seeking across directory boundaries

#1751
From: Junio C Hamano
Date: Wed, 28 Oct 2026 16:26
34 lines
14012 bytes
Patrick Steinhardt <ps@pks.im> writes:

> On Tue, Oct 27, 2026 at 03:22:48PM -0700, Junio C Hamano wrote:
>> "Venkat Ragavan via GitGitGadget" <gitgitgadget@gmail.com> writes:
>> 
>> > From: Venkat Ragavan S <mail2venkat21@gmail.com>
>> >
>> > When seeking through loose refs, cache_ref_iterator_seek() compares
>> > each directory component without its trailing slash. This can confuse
>> > a directory with a similarly named ref that sorts before it.
>> > ...
>> > Add regression tests for shared-prefix names, missing nested markers,
>> > and markers beyond the end of the ref listing, using loose, packed,
>> > and mixed refs.
>> >
>> > Signed-off-by: Venkat Ragavan S <mail2venkat21@gmail.com>
>> > ---
>> >     refs: fix loose-ref seeking across directory boundaries
>> 
>> I overlooked this topic, but re-reading the discussion, aside from a
>> test that confused a reader, it seems the topic was already ready to
>> go?
>> 
>> Any objections to the idea of making the topic ready for 'next'?
>
> Sorry, I lost track of this patch series, but I've reviewed it now.
> Overall this looks good, but I wonder whether this really should be
> split up into three patches because as far as I understand, this single
> patch solves three separate bugs at once.
>
> Patrick

Thanks.  Let's hear from the author, then.
Technical Details
Message-ID: <xmqqo6cdbxl1.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-73670-linux-kernel-git=dewy.ru
References: <pull.2258.git.1792067455341.gitgitgadget@gmail.com> <xmqqzevyg4w7.fsf@gitster.g> <auG5NTowgVZG9L2Q@pks.im>

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-73670-linux-kernel-git=dewy.ru
From: gitster@pobox.com (Junio C Hamano)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] refs: fix loose-ref seeking across directory boundaries
Date: Wed, 28 Oct 2026 09:26:34 -0700
Organization: Usenet Network
Message-ID: <xmqqo6cdbxl1.fsf@gitster.g>
References: <pull.2258.git.1792067455341.gitgitgadget@gmail.com>
	<xmqqzevyg4w7.fsf@gitster.g> <auG5NTowgVZG9L2Q@pks.im>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: usenet.network;
	logging-data="1813188"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:28ydcaItYiEjQFaSJoOgDN0EroQ= sha256:SA+xLlryQQGLfOzTIZrOEK1RTQqKIMl7MnxGeCvE4MY=
	sha1:SnhiptVPaEjjVL91o1s2TfGHNjE= sha256:nRNtHf/2nX0Z07sAxlvw6IKKeZ3q9+F3yw8XBUHBUu8=
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 953BE125C39; Wed, 28 Oct 2026 19:29:06 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-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=kTxqpdJm; dkim=pass (2048-bit key)
	header.d=messagingengine.com header.b=CTlgQ0DO
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 ll3uTAg-JWVU;
	Wed, 28 Oct 2026 19:29:04 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73670-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 13F6C125C3F; Wed, 28 Oct 2026 19:28:50 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id E9C482433B; Wed, 28 Oct 2026 16:26:38 +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=1793204798;
	b=IyeYTpf/KVNqAOZJkozaEj2Xb2XJ2+F2AKV638XNSpqjG91jIniK+GuWOx30gMhniTyW
	 erK/aAS17cSkJscYXuHTYv7fE5vrJ0lZ8jRyYKcBYX0LeuKKq/J0+zDl75k5jQQogHn0E
	 8LTX0YRdJ+XXIrhGEEzGubaV66X7AFynj5uPRP2B0/gsdCoRLj19JBgX+TWHSTeryHcj+
	 mg2vtzxRpSxDq7ACPYehc2HLQyJ22wnFe5oUM3X5H9oxWfYUt1SgyyYGzlwlHbl+sDy7l
	 axaHGZO5edF9UGUQd5yilo86x63UX8L1mmT961AIniKrWHJ6RkUaC8D13aGf5PF0x4A==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793204798;
	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=rh6O6bqg1Ib6WSHbQ7eAiZTxG51CATO9Z5Vizb5THgw=;
	b=oQoD+Y8H+wRTeq7bksD1L5Rv+JoANvrL+9zs0ARwWPUMolP44gq/OHtCWnCyndkDmoJG
	 8QCot/LFmXBz7ekUedU7+t/X/bdoUguDO07Ck4Ws74kDJR+DeXEv4x1iZn6+JpsMkuq2V
	 udPmwQ7h0Q7vsXVRtZHd1lDNqwUwPr3EL35ejYW2XwEfei/ecOwVmrqb0UPTEfCOSdE/W
	 j3dBNVPagl/UO7Sxf1t4+K7MtTRk+ki61XOicq4LtS8hCs9u1zw64VJdKcuhKE4Uu2V87
	 KngHNuOgWeexr3E7+3BP9McUYRt3d+PY9UAceFhfAbfl70mG7A/hzis2UdLtQSicVOA==
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=fm1 header.b=kTxqpdJm;
	dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=CTlgQ0DO;
	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 C016A606A31F;
	Wed, 28 Oct 2026 16:26:38 +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=fm1 header.b=kTxqpdJm;
	dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=CTlgQ0DO
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=202.12.124.159
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793204797;
	b=MEa7NpqpLHNLAwprYd4Y2x+WP0Q/hqc6LuDtHe818HlH0mfEfZd9xTbWd5CkUXyeu+Fj
	 F1FfbYjrSkYSk5rTxFD1gJyxXyErLgaEaH8Yi/xaefHbnKq9mmb4Xy59xRIOQd1tEsIei
	 msNMyUD8/ARIyAKSuZnip6lkG7CUl5JZXRynQOE3jQxucLg7e5/kCtr/HXMKl7OWk8rg6
	 jAe+Og9sHy4992Mv6bhyApdRiD4rBH/YXVyJoInna4PHntKmk7hj5hqpIVNZwl7+Z+4WR
	 SyaBiFv22RbWZnbl+gywh5V2nSZ+ezH4sn5ScA7ZzqkhVisoWa31CcuKL0nH66uk08g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793204797;
	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=rh6O6bqg1Ib6WSHbQ7eAiZTxG51CATO9Z5Vizb5THgw=;
	b=FvxzdwtKesLOrNmGR+A0CFFIq4gWuFaoRmI4pVMhkwlhCxGcqVi1y10U3mjsYGhiWhEb
	 VWCYxYKqE15jGAenjmK0knUgC5HTsHEGGZYeEKFFkcuqmaT//1o1+rlTXpVAWTkw17FQa
	 IaGAHP4Ex8g3zRpfjBaDYsaOK1pBcfdISGWs3ScC19NOIh01gcr2Np84psSy7PQ6ABmvo
	 dTVpUthZ8sqCxsdakBwupEGB3XdrsdMVZ3dl8jI4CzOejOPDeyNFnw7FT1/i0myWR46vr
	 +S58e/ovfqrvKyYqdN5Ogv4uNXhSzJXSN7KNBBlTbBJTNhhA1Nb9JycXe/qcV5OdqCQ==
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=fm1 header.b=kTxqpdJm;
	dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=CTlgQ0DO;
	arc=none smtp.remote-ip=202.12.124.159
X-Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.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 875E5606A32A
	for <git@vger.kernel.org>; Wed, 28 Oct 2026 16:26:37 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 875E5606A32A
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-06.internal (phl-compute-06.internal [10.202.2.46])
	by mailfhigh.stl.internal (Postfix) with ESMTP id D4A357A0133
	for <git@vger.kernel.org>; Wed, 28 Oct 2026 12:26:36 -0400 (EDT)
X-Received: from phl-frontend-01 ([10.202.2.160])
  by phl-compute-06.internal (MEProxy); Wed, 28 Oct 2026 12:26:36 -0400
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=fm1; t=1793204796; x=1793291196; bh=rh6O6bqg1I
	b6WSHbQ7eAiZTxG51CATO9Z5Vizb5THgw=; b=kTxqpdJmmmj14sXAfR8PXq/1o7
	Bg+dqj+Xple5UMAld3KfXPiqhL+60Y/OdJFxJ0IWtBygoWtjbI/SB/CI1Pm26X9B
	af3P9AdXuR1mkA+cN6oQdWtvXbVHgJxWmyZEr1jAxW1DJF9w1VjIG0TrcO+DHQBa
	qml7qnexaDWPDDjBkVZPOFv14LxQR9ufhGa+NrNQ/jKjcD6+r9766/FZ7jlAfp0P
	+TFM6GN2hxFcvcOXaix87HcC1uMXlWfB3IJz1rlNJ2HMdchQj9y6AKfjB2WsssQ5
	hJX0e5cLTzzDLVZLV0yHDUdiTiNNEQ9wYrd8mf3lQziXHKoKU11gzxyfIZRg==
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=fm2; t=
	1793204796; x=1793291196; bh=rh6O6bqg1Ib6WSHbQ7eAiZTxG51CATO9Z5V
	izb5THgw=; b=CTlgQ0DOTdRj6KA2auFIWGYK1V+7jl4BSXl6GkQpB9e9eo+d7SU
	lfzX82uF8qrEYabZamC+qa7z3V2rQvhs7HGoo2nMUH2Re5OCdLFnVYz1/ro57r14
	hUMlJb2J4r5ffE+qGxAeCmny0ZfQAPfZvFmZIpK28tAhkR7p+++UCI7uF30Gaye5
	brYZbB8zzrtRREaM1/S4uTowwdTngmR+RzupnvwW/R1dm26dmaA0eANypV9My0Df
	B9H3Vd78Ih9xbJfP0u1smh+aBMiyXPCYuYJH4Meu/Yl5Qw48Wia40GAMo6q/mPKH
	vg92sCZGHEV6VmVt8jQP04UExpQW0Kzp/hQ==
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=1793204796; d=pobox.com;
	mf=PGdpdHN0ZXJAcG9ib3guY29tPg==;
	rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+;
	s=fm1:rsa-sha256:Uwzq1DGVEYLPV3JuqvdjrDYNGUlCD2PvebM/oPeeHTtVEgy
	ywcuPeBm8Z/T/cr+0/CkEIXnbtQicQH4SeZytcsq9mh5wV2rpJa6SBkE2gqgUo/b
	WW6W16L1h+AVhilJJCW9wx3Pwyww4YM9bsc7Px2aXa8iFTiwQUNtiLmyqHiBd90Q
	DvjENKq5XnDjyb3SC+9LAJ2KGEGkVcjYBg6hP0F3aJ+Qd5QwSPD/0IBTRUyPRoc8
	74CCWYVjwFGucMXYPtKRPHUZrQpmkslzB/m6pSbzhDv3NxgfNCRGig+Hk3n8dhwY
	AnYPB+dIGDp9RHfGkFKOlslyFCKmxtUqT1YSXSA==;
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:jYu2i3XxEp1SbodhXqGeyEJGbQ8YFsAEZ7J+NA7saGo=:uAhsQl4pmwgmvgq6EBRcpBegRVAyel1uSUnrs/yYDk4=;
X-ME-Sender: <xms:PCLiajDCg-1TrQVFhy-yRVdVA4uiYJufYa9BmnYah4_3udTXkAFLOA>
    <xme:PCLiaonJObQn-CgPUxfGYAXTTX7sq080U6bIsHzKk9DIpaYhnMIGlqoovoONmmlgz
    Rm-bTNe5SMlFB-AUjrzgzQCCrQdQ2auATMJ5SPMMcymPu2az41giA8>
X-ME-Received: <xmr:PCLiakyjhNPeL7JJX3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oBN9EKJzEQsSalE1Twx7QGLFXE9U8wguvEQ2imEOCczbSXxSN7d>
X-Feedback-ID: if26b431b:Fastmail
X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 28 Oct 2026 12:26:35 -0400 (EDT)
X-Cc: Venkat Ragavan via GitGitGadget <gitgitgadget@gmail.com>,
  git@vger.kernel.org,  Karthik Nayak <karthik.188@gmail.com>,  Harald
 Nordgren <haraldnordgren@gmail.com>,  "D. Ben Knoble"
 <ben.knoble@gmail.com>,  Venkat Ragavan <mail2venkat21@gmail.com>
X-In-Reply-To: <auG5NTowgVZG9L2Q@pks.im> (Patrick Steinhardt's message of "Wed,
	28 Oct 2026 09:58:29 +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