🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1886

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

#1886
From: "Matt Hunter"
Date: Fri, 30 Oct 2026 07:04
27 lines
9288 bytes
On Wed Oct 28, 2026 at 10:26 AM EDT, Junio C Hamano wrote:
>
>>> This part of the code becomes overly deeply indented, and more
>>> importantly, the outer conditional around here has been reworked by
>>> another topic and the code that learns follow_remote_head will have
>>> to be reused elsewhere, which would lead to a nasty merge conflict.
>>>
>>> I'd like to see this part refactored into a separate helper
>>> function, by squashing something like this on top of this patch.
>>>
> [...]
>
> The 'ch/remote-defer-follow-remote-head-validation' branch at
> https://github.com/gitster/git/ has a change on top that you can use
> as a reference.  If you are going to make this a two-patch series, it
> may make sense to first extract the code commented with "See
> remote.c's handling of ..." into a helper function, and then extend
> it to cover the lazy behavior in the second patch.  When viewed
> that way, the helper function should not be named with a 'lazy_'
> prefix as I mistakenly did.  Being lazy is not its purpose.  Its
> point is to determine which setting of followRemoteHEAD is to be
> used, and the helper function should be named after that concept.

I wonder if it makes sense to incorporate such a new helper function
into the existing 'get_follow_remote_head()', since it would be the only
place using it.
Technical Details
Message-ID: <DMHZCS9LOW3N.ZJ3947HUCXZ8@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-73844-linux-kernel-git=dewy.ru
References: <20261018235508.848-1-colinlewishinton@gmail.com> <20261023185007.21642-1-colinlewishinton@gmail.com> <xmqqecdezfr1.fsf@gitster.g> <CAHeTm9NOqLA=BfTU9ABDFt8+jOzaRDPRrMNP8thzAQN2NVZAew@mail.gmail.com> <xmqqmrrxdhox.fsf@gitster.g>

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-73844-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: Fri, 30 Oct 2026 03:04:55 -0400
Organization: Usenet Network
Message-ID: <DMHZCS9LOW3N.ZJ3947HUCXZ8@lfurio.us>
References: <20261018235508.848-1-colinlewishinton@gmail.com>
 <20261023185007.21642-1-colinlewishinton@gmail.com>
 <xmqqecdezfr1.fsf@gitster.g>
 <CAHeTm9NOqLA=BfTU9ABDFt8+jOzaRDPRrMNP8thzAQN2NVZAew@mail.gmail.com>
 <xmqqmrrxdhox.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="2180145"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:TNan2d69+6u7rUPNlAzbypctl9g= sha256:DnNqH7OnTvqeg9T5OhUJpYdoj5UF4qlKVpic/y2eE0o=
	sha1:vxOQbOxMQhLQkGRWa0irrfIj19o= sha256:D3SOv189Y1DHn9oqpZ4sSFhz9uxVOvM9inqIPRJT3fE=
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 CBB32125C88; Fri, 30 Oct 2026 10:08:42 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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, URIBL_BLOCKED=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 EPGkCQibzsr4;
	Fri, 30 Oct 2026 10:08:39 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73844-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id C9E3A125C87; Fri, 30 Oct 2026 10:08:29 +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 98FE22935D; Fri, 30 Oct 2026 07:05:17 +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=1793343917;
	b=L6SggTYs/pT9opO6yFdcx5Vy4qyrAZf9poJ0Guojd6mo3NNmoBREggSQMXZ4H65Ndi5P
	 be1MUrPjFWXgLw/Kev+RkSJTrcFgnxOVo/g+WPlrgeLmfRhgeR4ZQQdDNXqUpWLrNN0Tm
	 lYN2AxpIZU8RLP/CjDX5eFOZ+ip4S26IU4z5Jotfvb0ioYWALk9yzjHR7e0g20IQk2llF
	 TRRDVe6J+WFUxjN4GBEIKeHFNjXBOaOEsldH8pzSeaW2zfNuIILskG6GI656MJ0MaMyYu
	 csemZu0vvX2++Ya3Cew50YSj8JPauqnTF8OUS0AeJspEdzIBjIKBTaqzlM1lRb1p0rQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793343917;
	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:Subject:Cc:To:
	 From:X-Mailer:References:In-Reply-To;
	bh=leOFH6kQGgY0O+gGECI7s1OG3Ts+lLdxRkEqNUYCLWA=;
	b=0qEq4luDNEMZ+9T0NW1Twj4gPRxScO/e8CgdlLU+XrDEkAenX3eQSr9uR6FA8mH6sAP0
	 V4hN6i8qhwAq6ge58aQFvVZWijL9XQAhm+AVHLsYq18wumZAmwuo5yt51HsO4OTtYQU4y
	 fKgc0QZk+D7Nh5+fOnSSdxsy+W5vAcuL3FucpqO3Xiir3YhAiOCB6oEXbMDCte2mjPSW9
	 Y6biDRRrzymW8FB0lJeq1uCJ7pc7IlT53dluQhjGPQJnc6ZjuM3FJra5P1uKVIRC2m2kJ
	 CRG+/2pmFFNg7pqVYhXkKheCsy+MllhkKnIaLB6dJgALJE/bTdpi7WxGDR3mb1HLkgw==
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=dVuRh8Z7;
	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 7108A606A31A;
	Fri, 30 Oct 2026 07:05:17 +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=dVuRh8Z7
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=1793343916;
	b=Dp2WYsRr9NtB/+mAbr5oXa4LYHagK4a0L9kk25NBv3M78BpamUv4kD+h/KAEwwQ4DsmV
	 S3YjoRZgXq+lyIbE1QuuNHrrhTGkUte4aJzTYJgHNmXIVBF+WciYyqG4CoChdPbtKkbx9
	 gJdlysTmaruQjW8uC//fzDOceje0YolmefoC/GpwG7+GvIC3qXOTw2EdW/Mfe17r8REJb
	 Ev0Rdkf/23nMfzLrvQrFE4tQ32Q3HcvvLbwjW7xjjrsKr1IvRHHzmc9UHaeEcO7z5p1qx
	 R0Se1XZnFyIvWLmjkVxVH61kuVWA4jGvHMqWF0TmtAUNW5Tghjc2VrUa4ScE2hYeo/Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793343916;
	h=DMARC-Filter:DKIM-Signature:Received:Mime-Version:
	 Content-Transfer-Encoding:Content-Type:Date:Message-Id:Subject:Cc:To:
	 From:X-Mailer:References:In-Reply-To;
	bh=leOFH6kQGgY0O+gGECI7s1OG3Ts+lLdxRkEqNUYCLWA=;
	b=r3J2KKz5nDLfiJE3tOiUxsGgJFXwzhKKO8WzLzlb4T/uh19Xc5Ipf0NOI10jAdhSOKgm
	 NnNp/3bCV21k4kAMJnEva6kHuVuR/XxPX1/fh9uaC4msqXq9NF63P4hkDtRZ2/G7vhJME
	 /548krydz4wKmFv3PRsgpbgQ25asjdxEc+9pApCZWgs5cQqaSv8YT3hZkvnVL87xL7JuR
	 3ikvcCeBlf8JaGLodtRxiUfFejwlVgMVRWXucpPMhn7CnvlraQZNZDzlNXHMdYchXUhDM
	 LP8ITRs4NnkaThypOvanwuIs7w7MYxYkKtwSQD3Bo3SN7qzhqd+n8OZf4UX7JzZsrAg==
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=dVuRh8Z7;
	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 E65AA606A320
	for <git@vger.kernel.org>; Fri, 30 Oct 2026 07:05:15 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E65AA606A320
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=1793343909; bh=dG0XEI61g9uZsYclzN+pMLuZBSM8IMR1DnKsXb70++Y=;
	h=Date:Subject:Cc:To:From:References:In-Reply-To:From;
	b=dVuRh8Z727ikLnpxNSemHhZvq8zo2WgSG+ZIoc0/bTnUGkXu4WrnJurXt+0Ia5Vxh
	 UNXbugS80J3YfExIye5AMlvm2bD94WmMC7o3DpFFCmOcjHMI0pm//UwRmmQgEH7daZ
	 Mbg7fgJYJUy/vyWjLXcFTj6AOoIySJNcu7i3nIwo=
X-Received: by mail.normalmode.org (Postfix) with ESMTPSA id E147562DF9;
	Fri, 30 Oct 2026 07:05:08 +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: <git@vger.kernel.org>
X-Mailer: aerc 0.21.0-0-g5549850facc2
X-In-Reply-To: <xmqqmrrxdhox.fsf@gitster.g>