Re: [PATCH v10 1/5] fetch: add remote.<name>.refmap
On 27/10/2026 17:21, Junio C Hamano wrote:
Show 12 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> 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, <refspec> 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
Show 13 quoted lines
> 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