🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2979

Re: [PATCH v13 0/6] fetch: avoid fetching every branch of a new remote in a shallow repo

#2979
From: Phillip Wood
Date: Thu, 12 Nov 2026 11:16
77 lines
14692 bytes
On 11/11/2026 17:37, Junio C Hamano wrote:
> Phillip Wood <phillip.wood123@gmail.com> writes:
>> On 11/11/2026 08:31, Harald Nordgren wrote:
>>> Hi, could I get some (hopefully final) reviews here?
>>
>> The diffstat for this series is
>>
>> 12 files changed, 593 insertions(+), 33 deletions(-)
>>
>> which will take a considerable amount of time to review properly. Yet
>> the cover letter which should explain the problem being solved, how it
>> is solved (i.e. the design and any trade-offs that entails, alternatives
>> that were discarded etc.) and anything notable in the implementation is just
>>
>> Avoid fetching every branch of a new remote in a shallow repo.
>>
>> I've no idea from that how these patches relate to the discussion on
>> separating "which refs to fetch" from "where to store those refs" or
>> anything else. If you want people to volunteer their time to review your
>> patches you need to make a effort to explain what those patches do.
> 
> I would say that it is a fair comment.
> 
> I understand what the first three wants to do.
> 
>   1. We have had for a long time "git fetch --refmap=from:to remote refs..."
>      given on the command line to decide how refs fetched are stored
>      separately from what refs are fetched.  This allows a configuration
>      to allow you to pretend that you give it all the time.
> 
>   2. Preliminary refactoring of a helper that will gain second
>      callsite in the next step.
> 
>   3. This allows "git fetch --refmap=from:to remote" that does not
>      specify what to fetch (contrast it with 1. above) to default to
>      fetch refs that our local branches build on.  The net effect
>      with configured remote.<remote>.fetchRefmap is that "git fetch
>      remote" would only fetch and store selected refs from them, only
>      the ones that we "care about" (aka "build on").

Thanks for the summary. I'm still not keen on patch 3 as I said in [1] I 
think it is a mistake to use the same variable for both "what to fetch" 
and "where to store it". After patch 1 we have the 
remote.<name>.fetchRefmap for "where to store it" and can use use 
remote.<name>.fetch for "what to fetch" (though I am concerned about the 
doubling up that happens when "fetchRefmap" is set and "fetch" is a 
refspec). We don't need a special case for when there are no refspecs on 
the command line - we can use the default values of those config 
settings instead and the user can configure the behavior that they want.

> I do not have strong opinion on the other 3 patches.  4. and 5. may
> help ergonomics by allowing to set up refmap from the command line
> option, but from my point of view it looks more like icing on the
> cake.

I think having a way to set up fetching a limited set of branches is 
worthwhile, but it does not need to be part of the same series.

> When we are working with only a subset of their branches, the first
> thing that comes to my mind is a "matching push" that does not need
> any fancy @{push} support.  Because of that, I am not interested in
> 6. very much.

I've not looked at what that patch does

> In any case, this topic one is keeping a topic by another author
> waiting to settle, so we have stronger incentive to see it move past
> the finish line.

What topic is that? - I can't see anything marked as depending on this 
in the latest "what's cooking" email. Would merging the first part of 
this series unblock the other one?

Thanks

Phillip
Technical Details
Message-ID: <5566b994-1070-41d3-807b-5fac9ddaa3d8@gmail.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-75273-linux-kernel-git=dewy.ru
References: <pull.2412.git.git.1789829246437.gitgitgadget@gmail.com> <pull.2412.v13.git.git.1793357550.gitgitgadget@gmail.com> <CAHwyqnVJ3eUQ9tkQE3rhQ8jFZjaD0tFUv41unE-NQ1WRiyfjBA@mail.gmail.com> <b64387b3-294e-49da-b40a-0e757956bafd@gmail.com> <xmqqcxsbnub5.fsf@gitster.g>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-75273-linux-kernel-git=dewy.ru
From: phillip.wood123@gmail.com (Phillip Wood)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v13 0/6] fetch: avoid fetching every branch of a new remote in a shallow repo
Date: Thu, 12 Nov 2026 11:16:54 +0000
Organization: Usenet Network
Message-ID: <5566b994-1070-41d3-807b-5fac9ddaa3d8@gmail.com>
References: <pull.2412.git.git.1789829246437.gitgitgadget@gmail.com> <pull.2412.v13.git.git.1793357550.gitgitgadget@gmail.com> <CAHwyqnVJ3eUQ9tkQE3rhQ8jFZjaD0tFUv41unE-NQ1WRiyfjBA@mail.gmail.com> <b64387b3-294e-49da-b40a-0e757956bafd@gmail.com> <xmqqcxsbnub5.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network; logging-data="1072537"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:oGG6O+XJM3rt3uIq3j/wucy8bBU= sha256:bOjZ+SmaRFg4u/X/ssrpXKVPd5f53WjZ3NNWUDRMmRU= sha1:+FXgBZckw/0DE6cMmw3u4olu1KE= sha256:G4ht8jpZqWOVtipahf0s7UuFqsnSTyAMLfXKe2lrOMw=
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 852841141F1; Thu, 12 Nov 2026 14:21:57 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.949
X-Spam-Status: No, score=-1.949 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, 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 icZx6xB0Hvgs; Thu, 12 Nov 2026 14:21:52 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-75273-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 7C1081141E1; Thu, 12 Nov 2026 14:21:41 +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 3DF1863AC3; Thu, 12 Nov 2026 11:17:19 +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=1794482220; b=fa9dK55q8+KwpmVAE4HmiscOTNrujGLbzSoGSbqqQ46STxg145wOpGpxpQSHIZ813TND aJjshKBBNKePrn86diGr4IKpGN1hrV1Lmhd4lN9ovH+ITLHfISR4cICfPpzUqTSpTW7ry KFbJdAQ1ED++ODSGhGEkEZAz5Pt1SBR+X+0Nzycjq4ZSZjcqNAyKYTfyQgwJ5p9ShK42+ JVyqVcBj6fC8VAzW8auZ7SW34HlUQRsEJP42ffAdGSVTxD8JlOpVOyUFCfBmgKRXk4pII oFfbYYeXFxEiHwzYhRUZ/K+94zIHR+6pRYf4hZ3ZjlUo2OCQJDoe3qSxtMLmJbcFPbQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794482220; 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:From:Reply-To:Subject:To:Cc: References:Content-Language:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=dDVSm+MUVKoI1j9rfsOJfxwv3WqeyTkWIzvZFCMXYUo=; b=cUNY4EKsclxM5YSBfg+0ByIBk/FqEwxDx5FWWEv6OX+17hkSuP1XWn+aqb4Dd6wFxUxu 0uDNMlsjMziMhIVpz8Mt1Y+vbBEpFW3q4rtRF65gOVaCsgs98lbvUHgoIcEsadaEpv3N+ UGi+gClma4W/KZe+CeqQa2VlgMjOpgUlg00gMx4xxb78iVb3lxHkrsgYQvq0p+ow+ma7I iPy2yy3H9sXZ7w9DP0NQwlEznXorX/YqsQ+Ax76+TUVxk6Z5WjbfbHKP19gHNm9cyWS9E gMKQW9viiGL2kwTa+6rm/e4lsXLkOoTKz0hWpIU7HE3NFtq/XIPWsF6M90LCJd0eSoA==
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="I/KIy28D"; 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 A13CF606A8A0; Thu, 12 Nov 2026 11:17:00 +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=I/KIy28D
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.42
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794482219; b=5YrnyncxBedn3UBEZibgQN2LhdU0jp/dlAwRVMjANbnBYH5VXqjp4tRJDZ3vrOekIAlu p9st38G2lOV//8lipjZGMu0JrmBtksE8Q3e4mbdn2D3WRif9Tm6xyEUovv5LPadyigYUc zCrwiJtI0DLc6uMmzJNFCETkF86sEH/4x3n2rO+GnwYfULrOprWA9MCJlr45qzPILo0U3 KbOiAH7GVkvX2KwJRQ8xE+2Mkv/x6uid17vW/fVoG44Re8u8DtdnxNj1HHUcI8kXgIm84 7Sv5xt6sFF67loQM1OqLsQOgddOax9unp0Zwm90UJWDXLfDilBV+fuGOKcuMBere6Dg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794482219; 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:From:Reply-To:Subject:To:Cc: References:Content-Language:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=dDVSm+MUVKoI1j9rfsOJfxwv3WqeyTkWIzvZFCMXYUo=; b=LVv9p3Sr453vrgkH5wrNaQ6dCZPuOz0IkGl/3I/XSEB4Ywqt7UXFk8i8LF3Xp2ofLNhq MJ+ST6wW+OfKnKHiL+8GgQBhZbA1F6UtLmGNQgzMcp0uGKZ8ZbuGhoH0Rj5VfdQw4+K9p ZrDMrTB16YFRiW92Y6GYFSq+Qv4B72cq63eYoJDgx/awCJc9DZyyKvObsZM7E5lOQ5BB+ d8M0iNnPyTauPXkoOJboOvUR6nLTnQyEu09S6Ey/tHmSaWOA0BshLaoz/NhqVcxO4x0+S DPMBQOyzH1HHJVPy11riiZJGKFOYV8cDV3NDRGsJKyVZHsP+xLOKzg16RNXErQ2EyEw==
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="I/KIy28D"; arc=none smtp.remote-ip=209.85.221.42
X-Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 7374D606A89F for <git@vger.kernel.org>; Thu, 12 Nov 2026 11:16:59 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7374D606A89F
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-wr1-f42.google.com with SMTP id ffacd0b85a97d-498f5fa4f70so2486584f8f.0 for <git@vger.kernel.org>; Thu, 12 Nov 2026 03:16:59 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794482218; x=1795087018; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=dDVSm+MUVKoI1j9rfsOJfxwv3WqeyTkWIzvZFCMXYUo=; b=I/KIy28DKwrk5nGm+Rp72kQiNUuOjwLPVLT7vE9hiU4FPwaCiOz67cgcJh60gUY79h u/Cbfwi2yB/0W4NOkT5H3JaINdmqfCGKfr/7Bmbhzpz0PwYfQ27nqRYw0OEQZf2HWGfe vNH52GebaKVa1xInLF4h2hWUo4A+695XbmtnFuLuF+3sLAY07zvLGRWaDjPVPHdAuP82 0maYJ+CH9NeUK4u62P8dioQWrYfp9sQrkSeVNNMDbilfG4BiVY+KRsHGdhWCEqBup/Gh GTlu2+yCgEEAU88VjjwFSHaoRqfOW5kzJV6xyzcl0LPX0HtIQx/Tyg4lrU4KCKqmYqlo pAvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794482218; x=1795087018; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:reply-to:from: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=dDVSm+MUVKoI1j9rfsOJfxwv3WqeyTkWIzvZFCMXYUo=; b=qjb0iiMCsnfuPUXi9OlfA9kXjXEQM11Zi4SNZHyQMjugmurJBLufn/WcGh/6enbOx6 7HSSICFSJC9qIs4gsbE8dhvFhoE66h3k7kSrtRnpj4yikzaHyW86MBUm7jDcoNucN/yk AygPFmHcfHbf/cJY8n7fpxNfne/yPnJP0k61nNBwn+VomDb15ZYaSbhlJFQ27cCELI1n p/TcNPTeZa67OFQvg/uNUnSeHf3UEoARnDXa1/kjTLW1BgNbH3STsuSXoEB1gGDgT8he PMQdauO0PmRmevSWDIfY49/L82enmhRWy7lJvpUKvgV9zWsBOmnBR9ZzJgcsQC+Liu10 9/AA==
X-Forwarded-Encrypted: i=1; AL+hErFyfXisVblkU6lpt9dTiu9QW0ZAlMpI2t+qh76D5uyS7+zYGzoMrafnzXpxOxMyRcexO/M=@vger.kernel.org
X-Gm-Message-State: APuU4Z+ix/u0m2gd/bCeh/HN1AjaYR10L8vZQr0crEAck+FBUzud8tFX O43glZTccqmTZ/Gt/X76IonHsOO4BXGHalQ9YmF/aJUsSxth0Df58k9+
X-Gm-Gg: AYBFou3ilSwhXSo/a0TJkJzeYslghuP8R3p7S5s/6kXr2vdlakZQAokl+kvkHeT1JnH nQBTuDVogb2dtOvBLUqIBrR5oVIlbEJjDtJ3eTbmN8SP4mipTyvdwp14rwK5PvbVR/ksXX+DncS rDWU5HbgToMn05xIQNuiZpxFW0+s6/H/SdDWbRezIn/kTn03zwGf4cmZQhzqLyNltMe1tPrj8g8 Q7SCmk6jKfZY4kAuzDpndPrA7vY2IMIakcHL6dpTwNpFbnevz4PYhw1RlYaxYRFuO68BwO2+nj5 GF6Rq5BhOonNKUmha/25tiys+MEKJJd/8ch9u5P5YY/IsdBGwf9SXc6l5WFNhs/vY0FB53nZDv4 1iuxCk9mj73fL5zAcws6Wzp4AZDmOnWw3JmN5Xd9prwGSfdEcqGkxOnoKoECTRfQ1sKGitLA9j9 iF1gydmUKuGBmIgHxx8zOD67utlSKOezxo+ySMeZyUCmtAq79PaQKHb+8gWFB9d0LtYf1qnuVGP Q/jhKjyWkD4TYkUhT0xb3BXPrcKInuZu2edyIUdS6VaUH5fE+kXh2SDgSn23MhXDira2ODgQ5uN l8QRSIuVcWmB+wq7+iCoF/sa8XxSUhnxq3T3peh/9yOY9oUfLwf7xooLwEXaUVm2h5b7LeAmm+A Uw9mfhcNk37ENMIrBD6x3PgXO4pAu
X-Received: by 2002:a05:6000:230a:b0:48c:6cdd:ba89 with SMTP id ffacd0b85a97d-499c7369076mr9797042f8f.36.1794482217788; Thu, 12 Nov 2026 03:16:57 -0800 (PST)
X-Received: from ?IPV6:2a0a:ef40:724:6601:f3ff:aebc:61f8:d91f? ([2a0a:ef40:724:6601:f3ff:aebc:61f8:d91f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-498369a4238sm16986468f8f.54.2026.11.12.03.16.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Nov 2026 03:16:57 -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-Reply-To: phillip.wood@dunelm.org.uk
X-Cc: Harald Nordgren <haraldnordgren@gmail.com>, Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org, "D. Ben Knoble" <ben.knoble@gmail.com>
X-In-Reply-To: <xmqqcxsbnub5.fsf@gitster.g>
X-Received-Bytes: 14410