From: Phillip Wood Date: Thu, 19 Nov 2026 10:53:36 GMT Subject: Re: [PATCH v14 1/5] fetch: add remote..fetchRefmap Message-ID: <2111d174-9571-4eb5-82cb-92f5330ae24c@gmail.com> In-Reply-To: On 17/11/2026 21:06, Junio C Hamano wrote: > Phillip Wood writes: > >>> I can buy it if the suggestion was to allow passing --no-refmap from >>> the command line (or would --refmap="" work?) to ignore .fetchRefmap >>> configuration, though. >> >> I think --refmap="" might work as --refmap overrides the config and >> --refmap="" is the documented way to ignore the ".fetch" config. > > Do you mean ... ignore the .fetchRefmap config (not ".fetch", which > is used as the default for refspecs and not value to a dashed > option)? Yes I meant --refmap overrides .fetchRefmap > All that said, it feels much more flexible if a refspec with a > destination (whether on the command line or in the configuration) > simply ignores the refmap. In other words, the refmap would only > apply to refspec entries that lack a destination, leaving elements > with their own destination untouched. I agree > This way, we won't have to worry about what --refmap="" means. > > So I'm completely fine with going in that direction. The only thing > I care about is keeping a clear one-to-one relationship between the > configuration and the command-line option: the configuration sets the > default, and the command-line option overrides it. 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" Thanks Phillip