From: Junio C Hamano Date: Thu, 19 Nov 2026 20:43:35 GMT Subject: Re: [PATCH v14 1/5] fetch: add remote..fetchRefmap Message-ID: In-Reply-To: <2111d174-9571-4eb5-82cb-92f5330ae24c@gmail.com> Phillip Wood writes: > Great. So I think we'd want a preliminary patch to ignore --refmap when > there is a destination on the commandline and this patch to be tweaked > so that > > git config remote.cabal.fetch master > git fetch --refmap=refs/heads/*:refs/test/* cabal > > and > > git config remote.cabal.fetch master > git config remote.cabal.fetchRefmap refs/heads/*:refs/test/* > git fetch > > both fetch "master" and store it under "refs/test/master" I thought "master" as a fetch refspec element is a short-hand of "master:" that tells the machinery not to store the fetched result anywhere (other than FETCH_HEAD that is). So the first one of the above should be how the current code (without any of Harald's code for configuration) behave, and the second one should be how the code we have been reviewing should already behave, no? With the first line in each sample replaced with (with or without the leading '+') git config remote.cabal.fetch +refs/heads/master:refs/heads/main the first one should store what it grabbed in two places with the current code, and the proposed update will stop touching refs/heads/main because refmap will take precedence. Do I understand what we agreed correctly? Thanks.