🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2430

Re: [Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes

#2430
From: Kaartic Sivaraam
Date: Thu, 05 Nov 2026 16:31
69 lines
14142 bytes
On 11/4/26 22:54, Yopa Nelly wrote:
> From: Nelly Yopa <yopatatchou@gmail.com>
> 
> When a repo has multiple promisor remotes, Git just tries them in
> the order they happen to be in the config. If you want to try one
> remote before another, the only way is to move lines around in the
> config file, which is awkward, especially once you have per-worktree
> or system/global configs in play.
> 
> This adds a promisor.fetchOrder config variable that takes a
> comma-separated list of remote names. Remotes listed there are tried
> first, in the order they're listed. Remotes that aren't listed are
> tried afterwards, in their original config order. The
> extensions.partialClone remote still ends up last (that's done by
> promisor_remote_move_to_tail() in promisor_remote_init()), unless
> someone names it in fetchOrder, in which case its listed position
> wins.
> 
> The sort happens inside each pass in try_promisor_remotes(), so the
> existing "accepted remotes before the rest" behavior is unchanged.
> Within each pass, the order from fetchOrder wins.
> 
> I put the parser in promisor_remote_config() next to the other
> promisor keys. It stores the parsed list in a file-static
> string_list. The per-remote order field is set in
> promisor_remote_apply_fetch_order(), which runs at the end of
> promisor_remote_init() after the partialClone remote has been moved
> to the tail. The actual sort is a small stable insertion sort in
> promisor_remote_sort(); order == 0 means "not listed" so unnamed
> remotes still sort after named ones without losing their relative
> order. It's called once at the start of try_promisor_remotes() and
> is effectively a no-op on the second pass if the first one already
> succeeded.
> 
> I didn't validate the names in fetchOrder against the set of
> configured promisor remotes. A typo just means that remote doesn't
> appear in the list and keeps its default position. That's how other
> list-valued config variables in Git behave, and it keeps the parser
> small.
> 
> No test, and I want to be upfront about why. The t5710 fixture
> always has the server satisfy a filtered clone from its own
> promisor remote, so the client never actually triggers a lazy fetch
> inside that test, which means the ordering change can't be observed
> there. I'd need a different fixture, one that gives the client two
> promisor remotes and keeps the server out of the picture. I'm happy
> to write that as a follow-up if that's the right direction.
> 

To be honest, only part of the commit describes the change. The rest of 
it reads part like you're talking to the people on the lis. You might 
want to give the SubmittingPatches section a read:

   https://git-scm.com/docs/SubmittingPatches#describe-changes

Also, this patch kind of tries achieve a part of the project without 
actually going through the RFC part of it. That feels a bit strange. Did 
you possibly misunderstand what a microproject is supposed to be? Did 
you possibly read the following guides and have some difficulties with 
parts of it? If so, I'd be glad to hear more about it so that we can fix 
the same.

   https://git.github.io/General-Microproject-Information/

   https://git.github.io/General-Application-Information/

-- 
Sivaraam
Technical Details
Message-ID: <894327d9-57b5-4adc-b300-25d946211606@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-74567-linux-kernel-git=dewy.ru
References: <20261104172434.691381-1-yopatatchou@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-74567-linux-kernel-git=dewy.ru
From: kaartic.sivaraam@gmail.com (Kaartic Sivaraam)
Newsgroups: linux.kernel.git
Subject: Re: [Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder
 when trying remotes
Date: Thu, 5 Nov 2026 22:01:22 +0530
Organization: Usenet Network
Message-ID: <894327d9-57b5-4adc-b300-25d946211606@gmail.com>
References: <20261104172434.691381-1-yopatatchou@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3682138"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:WormqMq2CiSwTn6Ua6TUTcjJkUg= sha256:O9AWctShVLqAXrgxxKuO6J+hwSoiWKrdostdgAc0v9U=
	sha1:9dpbA8MOl+Vcex4FaGze63xBKDk= sha256:SYRrMnBPdHeoUbUDKfZXY3rrLfwImeGHC762xO79cLc=
Content-Language: en-US
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 4AED7113027; Thu,  5 Nov 2026 19:53:09 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.148
X-Spam-Status: No, score=-3.148 tagged_above=-9999 required=6.31
	tests=[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,
	URIBL_BLOCKED=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 9sxeaOYFIrCA;
	Thu,  5 Nov 2026 19:52:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-74567-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 6F657113004; Thu,  5 Nov 2026 19:52:49 +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 5D5B13E026; Thu,  5 Nov 2026 16:33:52 +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=1793896293;
	b=bSz2lZRhRJsaSuVlfW3VkmwgBYPjqKD9XeI1Nfe36QlWN3lxEkOLsFlJAgLElIFIjvtt
	 YA64vVuWpVcidynN0BVhB6mS9WmFtX12wAT1Z7T01zPzKx8ouZPiZgrEdbwEVCq8U6zIA
	 Aq7vN/cgpHZ229xaNXxcjVJ38qLMiEuVxIEW62Y0XE+fhCz/0H7zgHL8W+1BhWuL1ML8b
	 /wmg4OaMObL8RPGHOedqf/ZsqLB+NAq8mrwNlFEX6wbqYxCk4UHV+rLlb/Z/GhYcr2Igm
	 GpJ2Hh6Q8WE0HFAd4nu3bcB2YcQYgBNZHqHcTZ+DHrexffxWM5JwwLlvNvkihCxQlVg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793896293;
	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:Received:Message-ID:Date:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:User-Agent:Subject:To:References:
	 Content-Language:From:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding;
	bh=tWSiJ4HHEEfEjfMhziiYS1jYmeKmz9xdDi80xZipqZM=;
	b=cOhmjiOV5ZnmboCYbn8egiCArpf7p3bWE7dI82srd/4Y4zCdRYrBDkoYCgfftCXIBCJQ
	 y/SrWGioj9E5586L4KvwUUIsuQW3ZVAJav3jywIswBoSpFWSD9vqptr1VwCX32vz80p7P
	 BwsI/RoSTqTbysd01UkQVs1xkbtCZYuUyqD+d3N7Mq31qqArIzHNtkQ/Dgf8s6tiRzxZF
	 +8rp+DkVXuI2RiMgawxRUbRuoctQiz1qAA3RNYsptxCQyWtVKO2GDy8RUdki3yY9Jq445
	 iUYK0ckc4VrFxdNQsNXjftheZx00WBbMjbNNrAJ8+2QKAECiY4RIbyZmh9/WkOEmEwA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="j/gb0Wqn";
	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 149CC60A5BD1;
	Thu,  5 Nov 2026 16:31:33 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=j/gb0Wqn
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.173
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793896292;
	b=02Gog3fsWXSG+FEAql7KbplNM5oDQEN36C1D6vHdsxwrDPUM92R7pXkYjbhv3DbJhun8
	 PnNMNNIEnMcjycK+nqI0f4lsWH7VNj9L/IDpNBsQ0Czpsxg+W+5PVtBCDrscy4hjwmASh
	 6Un9gJ+LLXoX2deRsUZtBcQ/FYZlLh1ZgJDhtIQMoXPtksWKjGGtLrdAPaxN1epMJU6VK
	 t6AwicrR39IB5oBPEw69q7I3W5UuaWdQze0MKeJ8L9F4l9+M33zZR76aePDHlfwxE9iAV
	 TY9HmNe/pUJilotzrkOAAPkcMK8vwRbef4E/nRGuPJJtVjd4S0tUib53W59C0xSKXjw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793896292;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 Message-ID:Date:MIME-Version:User-Agent:Subject:To:References:
	 Content-Language:From:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding;
	bh=tWSiJ4HHEEfEjfMhziiYS1jYmeKmz9xdDi80xZipqZM=;
	b=B+276gHtKszkKdF4N56STIGwYcAHdvnyVFL8zFxiGTWHiGrnavQuTL5L/b+VRETGIm5m
	 IrbBnfGSR+vWK8b6UrsetVGe1K8DcjWhBV6f9Y08q15QMw1sHKaDJsy2tv1Hk3A0pvr2e
	 XcxePiXg9OYm4snOFes6EdKbSiZ+QgiLQB6GJnvkdBvzJTx7YTEszkn/I8x0knt/XqH6T
	 e9yX8LFyYega8/S3xLhupWw1X13wOi2Ou99+e5MA+weeSyeBS62xLlDRQAil85N58/BmC
	 M1Z4KNQFDGUv2qluE9PhBYk0iIlhXYC6SW8pRYo4xnKSVOQKt+3Yt9dYNDgsQ2PbGlw==
X-ARC-Authentication-Results: i=1; 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="j/gb0Wqn";
	arc=none smtp.remote-ip=209.85.215.173
X-Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173])
	(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 D5639606EEA8
	for <git@vger.kernel.org>; Thu,  5 Nov 2026 16:31:31 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D5639606EEA8
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-pg1-f173.google.com with SMTP id 41be03b00d2f7-cc4be0e5351so958139a12.0
        for <git@vger.kernel.org>; Thu, 05 Nov 2026 08:31:31 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793896291; x=1794501091; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:in-reply-to:from
         :content-language:references:to:subject:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=tWSiJ4HHEEfEjfMhziiYS1jYmeKmz9xdDi80xZipqZM=;
        b=j/gb0WqnbXMKMqOwby1PJz80pM1FPPxV/eXtmuV/vXazaWZ6EhO5+TdlR/11m1vHD8
         uubWAKi78SpOdB+pStIL6qlEm5V1Z21BQc07YB4zN918YlOEYoasnuNKCoC1XNtbVYg4
         HXhgmfaT41zhO80k748ZHQSkHQIQbjuvuRiuE3jzSIZUKMkhzX25AbVl7MLA568n/7P9
         BTSk1Ce5H2pW/HSF/SBLI3sIvjYrGVhR1+J5MC5bb0M2ss0mhwUtoCGaTsmrP4s7p3xq
         VGTKwFyVs0Asnh43Uxrp3PlaJPAi8uzB6RnG0hpEJomD5Whd41k1C5COMCXx8TfXJXe6
         Y41w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793896291; x=1794501091;
        h=content-transfer-encoding:content-type:in-reply-to:from
         :content-language:references:to:subject:user-agent:mime-version:date
         :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=tWSiJ4HHEEfEjfMhziiYS1jYmeKmz9xdDi80xZipqZM=;
        b=v2jn+Nhq/nTOlOie5Y//u0IGLBiI3zHpps+aTDIEkd+OtwvXtJ67YrIEiPixkun54N
         BgJFZpAJIBI6anxzeYtby+ZX4IjbrOK0uQ+SfgGyO4pgccpAODAQGSDuL4GeW7uk0KF/
         Alcghsh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x9XBUTzZnoO4q4EnkvIm7mLdNpyxkd3n3NtYg0f/g=
X-Received: by 2002:a17:90a:ec90:b0:3ac:9c37:942e with SMTP id 98e67ed59e1d1-3ae89831a14mr16791280a91.49.1793896290920;
        Thu, 05 Nov 2026 08:31:30 -0800 (PST)
X-Received: from [192.168.25.219] ([115.108.41.154])
        by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b0b31d2b5esm4465816a91.15.2026.11.05.08.31.24
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Thu, 05 Nov 2026 08:31:26 -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-User-Agent: Mozilla Thunderbird
X-In-Reply-To: <20261104172434.691381-1-yopatatchou@gmail.com>