From: Phillip Wood Date: Wed, 28 Oct 2026 16:16:13 GMT Subject: Re: [PATCH v10 1/5] fetch: add remote..refmap Message-ID: <241e7bbc-7144-4ebf-af76-84a06a982574@gmail.com> In-Reply-To: On 27/10/2026 17:21, Junio C Hamano wrote: > Phillip Wood writes: >> >> Doesn't that cause older versions of git to try and update the local >> branch when fetching, or is it only when pushing that we'll fill in the >> right hand side of the refspec with a copy of the left hand side? > > I meant in the above example that remote.cabal.fetch should be used > as if these three refnames are written on the fetch command line > when nothing is given from the command line. Now, that > does not have :dst side for fetch stores the result nowhere but > FETCH_HEAD, so without remote.cabal.refmap (i.e., older versions of > git), you will get them in FETCH_HEAD, so your "git pull" will still > work to create an octopus merge ;-) Thanks for clarifying that > I was hoping that with refmap, the users can tell the system where > to store them. As specifying a shorthand also works, > > [remote "cabal"] > fetch = master > fetch = next > fetch = seen > refmap = +refs/heads/*:refs/remotes/cabal/* > > would be an easy layout to allow adding different branches than > having to say > > [remote "cabal"] > fetch = +refs/heads/master:refs/remotes/cabal/master > fetch = +refs/heads/next:refs/remotes/cabal/next > fetch = +refs/heads/seen:refs/remotes/cabal/seen That makes sense. What should we do if "remote.cabal.refmap" exists and "remote.cabal.fetch" contains a colon? We could just ignore that entry but it might be better to error out. Thanks Phillip