Re: [PATCH v10 1/5] fetch: add remote.<name>.refmap
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 26, 2026, 15:51 UTC
- Message-ID
- <xmqq8q3ktq8m.fsf@gitster.g>
- In-Reply-To
- <af521f7f-b05a-487e-9972-b8cc2dc02ef7@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 15 quoted lines
> On 25/10/2026 22:15, Junio C Hamano wrote: >> >> I just encountered a case where I wished to configure both refmap >> and fetch at the same time. From a second remote (let's call it >> "cabal"), store any branch fetched from them in refs/remotes/cabal/ >> but I want to fetch only their 'master', 'next' and 'seen'. I'd >> want to be able to write something like: >> >> [remote "cabal"] >> fetch = master next seen >> refmap = +refs/heads/*:refs/remotes/cabal/* > > That's a coincidence, I sent a message earlier [1] arguing that we > should have separate config settings for "what to fetch" and "where to > store it"
In other words, "what to fetch" and "where to store them" have separate configuration. They should be made to interact correctly and the current patchset may or may not work the way we want.
What we need a separate setting is probably what should happen when we do not specify "what to fetch" at all. One heuristics is what this series proposes i.e., "what our local branches build on". But that does not have to stay the only option forever.