🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1373

Re: [PATCH v2] remote.c: defer remote.<name>.followRemoteHEAD validation

#1373
From: "Matt Hunter"
Date: Sat, 24 Oct 2026 09:28
37 lines
9464 bytes
On Fri Oct 23, 2026 at 2:50 PM EDT, Colin Hinton wrote:
> Continuing from 86129fd (fetch.c: defer fetch.followRemoteHEAD
> validation), apply the same treatment to
> remote.<name>.followRemoteHEAD, which is still validated in
> handle_config(). That emits a warning for any command that loads the
> remote configuration, such as "git push" or "git remote -v", even
> though only "git fetch" ever consults the value.
>
> Store the raw string in struct remote instead, and resolve it lazily
> in do_fetch() through the get_follow_remote_head() helper introduced
> by 86129fd. This replaces the parsed follow_remote_head and
> no_warn_branch members, and the NEEDSWORK comment left behind by
> 86129fd is removed. "git remote set-head" now compares against the
> raw string to decide whether to rewrite "always" to "warn".
>
> Moved enum follow_remote_head_settings to builtin/fetch.c as it is no
> longer referenced in remote.
>
> Messages for an unrecognized or missing value name the full variable
> name prefix, as the helper now serves both the fetch-level and
> the remote-level setting.
>
> Signed-off-by: Colin Hinton <colinlewishinton@gmail.com>
> ---
>  Documentation/config/remote.adoc |  4 +--
>  builtin/fetch.c                  | 45 +++++++++++++++++++++-----------
>  builtin/remote.c                 |  3 ++-
>  remote.c                         | 28 +++-----------------
>  remote.h                         | 13 ++-------
>  t/t5510-fetch.sh                 | 18 +++++++++++++
>  6 files changed, 58 insertions(+), 53 deletions(-)

Besides Junio's whitespace notes, I have no additional comments.  Looks
good.

Thanks
Technical Details
Message-ID: <DMCYNNPMFVMA.S74D9Y3OQ9QE@lfurio.us>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73133-linux-kernel-git=dewy.ru
References: <20261018235508.848-1-colinlewishinton@gmail.com> <20261023185007.21642-1-colinlewishinton@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-73133-linux-kernel-git=dewy.ru
From: m@lfurio.us ("Matt Hunter")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2] remote.c: defer remote.<name>.followRemoteHEAD
 validation
Date: Sat, 24 Oct 2026 05:28:46 -0400
Organization: Usenet Network
Message-ID: <DMCYNNPMFVMA.S74D9Y3OQ9QE@lfurio.us>
References: <20261018235508.848-1-colinlewishinton@gmail.com>
 <20261023185007.21642-1-colinlewishinton@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="730449"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8jfr6A35am0OOS6oXaJknJsP3ds= sha256:2glvzloI0VF/dye/iO/zMr8Twar+pdMNEIA1ARA4dYE=
	sha1:PJXEyaVCYV5iSAAHS3E5e7z8GMI= sha256:ojAG/vwMaWP/dFTdUAnezJG9cQYKw+SiwntuIdFb9Kg=
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 9DE13111619; Sat, 24 Oct 2026 12:35:23 +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 (1024-bit key)
	header.d=lfurio.us
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 V76Ua3y_oky2;
	Sat, 24 Oct 2026 12:35:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-73133-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lfurio.us
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 09921111600; Sat, 24 Oct 2026 12:35:11 +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 CD78E2CA9D; Sat, 24 Oct 2026 09:29:53 +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=1792834145;
	b=mPInt3Lzy0ZN8DJ7C5/txnJlnN487KPJdVWsuAvLR52wJgOJzuvCO2BnSU3Z6gfbDfbC
	 zjL8Opz5E4VtiOe1by3DdKq5qYi1NUzuYDroMnMvxqGgh0alt+pTALG43zuQpGKcmRh9K
	 +Y2mbdLpkwxuCtOEs/YtSmOLcjY57TD9LSpHRygHrDpodDxCT+x8fF1Y7gYPH41MosKyx
	 c8WwM4yWh8jSIQWjlb+QjxizmznZ4zv3Oew42aIiNW2d7NyXcjIFF0ugBclCdM9raEkTY
	 N10AxOjlWm1QhXlg54U6q5HpyXqy/KMV/GlzCyWnFD5TVXUA8YxXgEODMv+jj5fDItA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792834145;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:Mime-Version:
	 Content-Transfer-Encoding:Content-Type:Date:Message-Id:To:From:
	 Subject:Cc:X-Mailer:References:In-Reply-To;
	bh=ZTzK6ifbbTfqr5YetgylOUfD8nyXA9yjraIsuzKJrr8=;
	b=1Qu690RbMjUFUjp+gYH0cOYMd68hekOjRfU1SRnW3iFK4+4A4uMW8ltH9YKL61u8IfGL
	 s94ntLNbF7b5VTaBC4qMt5gsPYOK8VmdYqxCtAH+tZU5qr8/FCYdgleeE9fN48QefSFcZ
	 TW8bKGQu3145BDdsh41sZHNKVMjkb6OJEfCBTpQ9BDKb+o30xl7mPd9SolSvVKYQKZAr5
	 4gPX4KdQ06lFI2QnOc8CaJjeG/P2OmNFZtN0ksqwMOwATMj1rdYQ55XkNVv6DV+7lGRBF
	 IWT3M6YIljbFSe+e/CMf+0WEn27jVlwRw5lfVgGahWtopbgS1pdqYZzGrY9riLE/6Uw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b="g/kgEYhN";
	dmarc=pass header.from=lfurio.us;
	spf=pass smtp.mailfrom=lfurio.us;
	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 3C4ED606A33E;
	Sat, 24 Oct 2026 09:29:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=g/kgEYhN
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=157.230.60.252
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792834144;
	b=FUTLwla9M+48yKizUNssT73GYOhH65pU9C3V7DMKrAtjGCbuPTH/+Di3hcA2F9LCn2RD
	 Zga3AcrHVMlqzVhjX8Hkxn+o0waC63MjbP/4bb7XbHkkVoY08ReWkdDhAhP0N2z06yhma
	 oNoTBUYji4BOlNHWfk0yn1Wkar2Sw8iQv3P/bIvL6RO+5sxW9F7rXiXsRrGO5Jm8o2xfZ
	 2fSswL86F5xkoGlGdQXiuyla3ifcgRo0ANjoSRgsjOEpj8HqR57BZcpiILT1WFGiTkoLz
	 CmqxZ/fZRoqnOresOZzoREv3orIJ0vSfcS515BX9ikL+iBFwuubbbzHk5/NpiqMHf5w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792834144;
	h=DMARC-Filter:DKIM-Signature:Received:Mime-Version:
	 Content-Transfer-Encoding:Content-Type:Date:Message-Id:To:From:
	 Subject:Cc:X-Mailer:References:In-Reply-To;
	bh=ZTzK6ifbbTfqr5YetgylOUfD8nyXA9yjraIsuzKJrr8=;
	b=xF4Ww//NR8onOqajXu68Wnq+lTiMovReIcWQKcVe4w5Yx7Rkh/KZMG/OWI5bCgbzMcjK
	 cDmfsqxHCuIYf/N9gRJSEfdzIzwGGXWEpqtmAuZj0d5FqHRYG2hTse//B3zYj5DltrJoE
	 6BQyMsYu0mox+qLPCysbszxfcf6K2NB8ugTNyhU9/GGOQEZ3T8MBVD59qMbwerNNKv7cG
	 EUD3w0zb1MzJpI/JHaEEc2/09mRWrK4aDu7M6SCg5C8wc+MkPauHYEnUPyoiHAv2dcrBB
	 dXUgdk6DMil9yPEchj3kCYkzg2OdyLMTrXwlV6csv4zJke7kjOcDqvxt+Mo3HeDfo0g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lfurio.us;
	spf=pass smtp.mailfrom=lfurio.us;
	dkim=pass header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b="g/kgEYhN";
	arc=none smtp.remote-ip=157.230.60.252
X-Received: from mail.normalmode.org (h01.normalmode.org [157.230.60.252])
	(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 BF3B0606A31B
	for <git@vger.kernel.org>; Sat, 24 Oct 2026 09:29:03 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BF3B0606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lfurio.us
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lfurio.us
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lfurio.us; s=default;
	t=1792834142; bh=XPnU94aMWRgTWTq59djOZ8B6PNYqWBye7Rme4hm78t4=;
	h=Date:To:From:Subject:Cc:References:In-Reply-To:From;
	b=g/kgEYhN2vkhdQCjXruVieT1hSMy6eKhvlO2dw+hlsEiLATN+/7qqn85TZ3gDoBct
	 O+h4TNUlTvmmHfkoUSfk5Qe+cw7D8f5Rj5HhzYxIkbvctohuOxtBNk4B2oaRk+mKHs
	 mm3b2lae9cWTsnJ2LkeMVw9Hy5qpWJxMxHYqqTF8=
X-Received: by mail.normalmode.org (Postfix) with ESMTPSA id 7C4FA615DD;
	Sat, 24 Oct 2026 09:29:02 +0000 (UTC)
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
X-Cc: <gitster@pobox.com>
X-Mailer: aerc 0.21.0-0-g5549850facc2
X-In-Reply-To: <20261023185007.21642-1-colinlewishinton@gmail.com>