🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2664

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

#2664
From: Colin Hinton
Date: Sun, 08 Nov 2026 21:45
42 lines
13787 bytes
I prefer Matt's approach as I agree it's cleaner and simpler by
removing the setup at the call site. I'll adopt it into my next
version and will give credit to Matt for his contribution.

I am still holding on to the re-roll until hn/fetch-refmap is accepted
into 'next', so that I can rebase and resolve any conflicts myself.
Junio, if you think there is a better branch for me to base this off
of so that I can begin the conflict resolution now please let me know.

-Colin Hinton

On Fri, Nov 6, 2026 at 8:15 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> "Matt Hunter" <m@lfurio.us> writes:
>
> > On Thu Nov 5, 2026 at 11:03 PM EST, Junio C Hamano wrote:
> >>
> >> Hmph, interesting.  Can you rewrite Colin's patch using this, and
> >> then merge the result into 'seen' (after reverting Colin's topic
> >> ch/remote-defer-follow-remote-head-validation from 'seen' first) to
> >> see how badly it crashes with other topics in flight?
> >
> > I still have the commit sitting around.  I tried this and a replay of
> > the current topic to compare -- the conflict is the same in both
> > cases.  eg: Nothing else in flight is touching the
> > get_follow_remote_head() function.
>
> Thanks for investigating.
>
> Your approach of passing more context into get_follow_remote_head()
> and have _it_ do the (lazy) conversion from string to value makes it
> much easier for callers to make calls from multiple branches to the
> function, because the need to "set-up" to make the call disappears.
>
> Very cleanly done.
>
> Colin, what's your preference?  Can we move this topic past the
> finish line?
>
> Thanks.
Technical Details
Message-ID: <CAHeTm9M5maWM=yrJPNzCibv_rewH3-yBK8J5-MDyDvPzfihe4A@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74850-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> <DMHZCS9LOW3N.ZJ3947HUCXZ8@lfurio.us> <xmqq33tnz0hb.fsf@gitster.g> <DMJFKJCI5DLL.12R7AMFO4DK2Y@lfurio.us> <xmqqjymqobc3.fsf@gitster.g> <DMO0XC1PL4MP.1J5830XZ4GCS5@lfurio.us> <xmqq1p8ylywh.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-74850-linux-kernel-git=dewy.ru
From: colinlewishinton@gmail.com (Colin Hinton)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2] remote.c: defer remote.<name>.followRemoteHEAD validation
Date: Sun, 8 Nov 2026 13:45:16 -0800
Organization: Usenet Network
Message-ID: <CAHeTm9M5maWM=yrJPNzCibv_rewH3-yBK8J5-MDyDvPzfihe4A@mail.gmail.com>
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> <DMHZCS9LOW3N.ZJ3947HUCXZ8@lfurio.us>
 <xmqq33tnz0hb.fsf@gitster.g> <DMJFKJCI5DLL.12R7AMFO4DK2Y@lfurio.us>
 <xmqqjymqobc3.fsf@gitster.g> <DMO0XC1PL4MP.1J5830XZ4GCS5@lfurio.us> <xmqq1p8ylywh.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="211485"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:NYiTu1rLHCLugRi1HgUL7xrN8zs= sha256:u4FafjQUy5J6HGoGiyekKBpOonOxc9NfEaDFCL/4k8E=
	sha1:zcBR5Wzt+gkOmKBFL7ATqoiK82s= sha256:dDPqvTjSH0Z5+hgqDlVIYezBkdUDleNxx+UCGZ+0Jmk=
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 CA79511361C; Mon,  9 Nov 2026 00:45:57 +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, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, 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] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
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 auyxn0UR5Ng3;
	Mon,  9 Nov 2026 00:45:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-74850-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id C536411360B; Mon,  9 Nov 2026 00:45:46 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id A0FC9647FA; Sun,  8 Nov 2026 21:45:43 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794174329;
	b=gTN3/f5vAOej7pshY2VUru6lACr6nMrEHSi+8pRsPp2FDT/JjQs9XR/ZJXE1iwQHdTJi
	 4LlyYtjfoE2qR51OQFG/Za9SkUQZqWvjqF2wrPZgUWrdz+qNq5o4KtdUHTSqojgXS+2AM
	 VD7KSm07hOewH0pHt4uT9nKw0zBRH407ZSJjVh0Tk9hJotCgEkiiJLTyHpRFHYuWmrq8P
	 r+EU99Mfcp0Fo7p8RTCHE+0UrdhdPQjXv1ERyJnmY8Y6IObDmVIG3NtgwxBJmdpWfAgSj
	 X40kwHY1Ldyzqi2BzCI/+V4UxRXKv6wURZ20ykVUdOuVvBTeSup5dxhA+yVnfw+z8xg==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794174329;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 References:In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:
	 Cc:Content-Type:Content-Transfer-Encoding;
	bh=/tB4aJkN44ffppZbx8RR2I0Gji5t0eQCpo3CtQaX/24=;
	b=vkmF40WdM+vkeAJsk8LYjjEg2aurQwGXjD0i0YRmv4adfYeBPvOH85rjkPP2fehSZM/Y
	 NU1APnGC3tjXKC0LUxRZLI4RGYig0jxE3BMCPIPajg1Y5SEzlCeb7K9QVaN/JbHuzBlNS
	 hIYmJbTCvx18QLsCLluGoArlImY220KrMMyUkhNCQopcSRgnLWnzkMZWDL/xAthx1r0p2
	 ad4FKsGWUoVne0JUlIVsnnqZc4EFA1sxhF6c0F6FO8mXtpDHya+LzcpnbZHgj18ljEC/n
	 lfvmEcUti7NeBSJzjgF8XGRTEN9st4lmfWxEYnVlpL8QKLcp7x1etVF0fgqR299IdGg==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=JHrCcUw6;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.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 715B4606D836;
	Sun,  8 Nov 2026 21:45:29 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=JHrCcUw6
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.128.181
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794174328;
	b=tFZWQtoFHim6yx0PUvf+wbs3PZiFqTuCTMQfmn1y4xxKL2Fci4pBhNdZQxrKUh8wYM83
	 T/ZoJMzJha4uamuT9FkaiqKcmIvze4vmyFBVfY5CukPY8Yo78HbImt/tQf9OI58Mcvfd5
	 f1EXOgFNc93nmpe2QZvmvEOYOd1x9YzFBZStfGV6o8z4DCqrlccRW5mkU9AAv4KLEX+Ol
	 VY/DwJqFEokGmTmrPQEcqnUd60WPpbojwHVmgek9T3wRDhzxhFG6RIBlzJ44k6zkfysdt
	 I+cjHrISF3btcwv3RyI76O6e8VS+dm2Yn7jhpBzX8EkcYozHBMXvkjEs07NYhRbFDvA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794174328;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 MIME-Version:References:In-Reply-To:From:Date:X-Gm-Features:
	 Message-ID:Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
	bh=/tB4aJkN44ffppZbx8RR2I0Gji5t0eQCpo3CtQaX/24=;
	b=kvQI7Xf50ju5p1hJNuaPwqQMGozBbN/VSCywroS9dijit0wgjvBbma014/d1f3d1sKii
	 5Mi7yeMBx8bkDHajg1ajucnDoFO1QtfT3Qr9cchsRcoGAj37IKU6QdIHg/s4VcSSWN+Aw
	 xm1iXv1h2g65tyu2TsPwprLS8XR3aXJNrHjvDZQLiZsGYJ6VilQkSX4/TBmlbzHkL1rYw
	 L1pPUWD3gPmBqjrBfHuXXZA17d0r2BgFghdd0AUj07kg1/zwPhJbB8O8f6BOEz4UP7Dni
	 cI96oubzkAzZ9qdHkneE8PeBT3d9Z8Z57jbPM9yUxWZE+ZZEAcDQhsdg6DFC6CsKhbg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=JHrCcUw6;
	arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.128.181
X-Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42F4A606D81F
	for <git@vger.kernel.org>; Sun,  8 Nov 2026 21:45:28 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 42F4A606D81F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-8b0d63f60bcso3718307b3.3
        for <git@vger.kernel.org>; Sun, 08 Nov 2026 13:45:28 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1794174327; cv=none;
        d=google.com; s=arc-20260327;
        b=NweJhoN9fwRF6qhK85rqRosGOVlvaNbmNV4uw4iVnTmM22JAwLjUJqT3Vrmv3IYl3p
         R8xJYUkhISFna0wHWi9Up8crseC8jFD6ciY3NUQuDchUSgtqoTWp/63XxzZUImp7j+sn
         5G6H7CyoPNdTJ/wDOen1PzpLTAezBnsygh0u0g3gCCbY3Ec3wxuUNOCdPc8SYNCg9vq7
         xkhwimKlKlvwj74ErlNoWvkskEJvLLa5iimKHX3z5mIf4lK3A3GGlGDbIyxhQxVFtQvS
         SWg/GPGKrT9lU1dE7vPhrEC7Tyh2mskBWOe0kk/lBdA0yqg2G48Hvaecc/6wKmNYDJmZ
         DaWQ==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=/tB4aJkN44ffppZbx8RR2I0Gji5t0eQCpo3CtQaX/24=;
        fh=aYyYqfXN/U/3wmOLZBiqGoGjg4mYSlmnxuQTIc/mWR4=;
        b=TgmOEenfGYCDaKOzRGIivzbnd2nXO1WfpcMXhCPMDFdBi899dQZsd26DXWxvq4VFfF
         lQB1qdg9eRbv2qNGrKSlcHRjuNrSi/0KQhlF3M0pUnAdHNVSoW9gKechrvKu3NZICnJp
         wr3ssPMsogxihKp9uZbnBjgu8WkMJDtfvQHzzwWWSDTlXAUdl/KhBNnmSOwsP6Sjtilc
         MfoZqAtxThilQnZMapUHsUpy6JcVEqWVPEj8UVFv53GCK8BUHqk+eYbisUHPFxhPRe4F
         bxe5xO6OrgVm/966bBL0onSTKmCWfb50MZrWp0xfxbrBLEi6Xm4cGyyBVS9H6wxV7kbp
         m+Kg==;
        darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1794174327; x=1794779127; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=/tB4aJkN44ffppZbx8RR2I0Gji5t0eQCpo3CtQaX/24=;
        b=JHrCcUw6ioWuh3VJKTKnzuM0Z+VKPPByOCSAh0ZsPy1xJTGYWvKQGJa1LOovL/YsHj
         gcWOgCo6gt0pRTrnU4Vhm/sYN3wK8cwKbcjc7rIougEI2mKoacDhOzRfAU34WkGaFSFB
         z1wlY1fGgsVhdM9HsiY8thmfOuHxxBgmoTq7/p874B/x8+ALFs+7+99fjVscwjdU414A
         q4HUzFr0co3bUdTzZjCeTZnaCjWyGfz+XOZveTcuga72qIVFgYJYk55oxst8yaaHPAR6
         KDyPzAXbmnY8IdN71Xnf9gc4e5eW/t9EwgG8wtbnz0JIfidO3p3E9CJejIdzThcqZkxd
         3zlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1794174327; x=1794779127;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=/tB4aJkN44ffppZbx8RR2I0Gji5t0eQCpo3CtQaX/24=;
        b=eSkbTeV3czafRdWtFehuJEenNlto7rbku9SpTXjZZ1+SAKPLBPn9Oz3jS/LkbRDgG4
         qzERMvTmq5TXnF5OE1/nxXuN34tVEX35Fp78r0D1OooBl7DziKIcdgtrSH9od6lZxgUZ
         ZrM3fK8Yotf3qbl1yfkHgCDDksX68VXVeOVs3mkkWrAyt5WJxTpOHov/4US1uxvPZTmD
         w+UwC0HZbmQqUbhqVsrvUnCyPViaUdxBeNcqY/OzLQR+VRgnUUjUsI03fek2wOCrJ2pJ
         w9VgUdEikp/OdNewRl1OBQpQ3fD9Lx7zcZrpSQLP+IFbGLjdp5bdjZxdWzh89XDLWSNY
         FLsA==
X-Forwarded-Encrypted: i=1; AL+hErHwpTnqojL9lET8tYFz8kEZsVDUuMNDcRylDB0HEreDj+v1jRWesnYu3oQNA2wObOdpT6k=@vger.kernel.org
X-Gm-Message-State: APuU4Z9Typ/qjJ1bFNRvn3AV/p9Mps3G1GM9nnzUWbc0RPypuxAGLi+9
	/PnGd1hDBFhjSO/ENf66Ts55KoJBnG/FlUt7P9aryRKUu4EPyvINOKS2gcxaZO7uhNoKfYO16lG
	ulFqJKRfO3/c+KbENeQf1Bw0Ppi+/kiiSOOh/
X-Gm-Gg: AYBFou2ZponxgEjMObxZqEblLVmmJHRLRgCPSzZKsRFn1fIcy+m1jojo8zc/klqWQsz
	Qrw1zqMRRz0690lAH/D7s+4x9Dr4+jXp/HKhJDQ6YhrKO/Yj8+dmEhuUFRkvvksDtJlRVbR1aGA
	sRrhuJruo7ggyxx6JA00hYRCbnNduKvTiGEk4cX3+/ae9JTXYMa9vp48JqPGCUQBZ3W0sZSCmHA
	GP1Y1oAajQ4QA7C+7Xnp0tuEHoQA3SS8n5rYioGT/G+Pior3hb201DGDq2uOfkCfqeFfH0yCJed
	bw8P7Bt/zt6k0o1kt7McERs3ndUrVb2GsUmk0B6Keu82izNOhvnHZRHP/KYWasUghE7GJu4WCBp
	RI1BfmFvtpqXaZQnDhdVEj/AtG1KjReQpbjToK48CDCTxR0uYOoGfeyOJmyKAK0QvyOkyrg==
X-Received: by 2002:a05:690c:e650:10b0:8ac:46ff:d376 with SMTP id
 00721157ae682-8b36ca0cb6fmr9572847b3.28.1794174327093; Sun, 08 Nov 2026
 13:45:27 -0800 (PST)
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-In-Reply-To: <xmqq1p8ylywh.fsf@gitster.g>
X-Gm-Features: AclHuK8bhCAwqKXiuodFfR9MlGTf5PdkwLsaybIU-aSJtjJmxWByJ2lJKKFMfR8
X-Cc: Matt Hunter <m@lfurio.us>, git@vger.kernel.org