Re: Plumbing for mapping from a remote tracking ref to the remote ref?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 18, 2022, 23:04 UTC
- Message-ID
- <xmqqczf5lgk3.fsf@gitster.g>
- In-Reply-To
- <nycvar.QRO.7.76.6.2206182358350.349@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 10 quoted lines
>> $ git refmap refs/remotes/somepath/{branch-A,branch-B}
>> origin refs/heads/branch-A
>> origin refs/heads/branch-B
>>
>> IOW, you give name(s) of remote-tracking branches and then you get
>> the remote and their ref for these?
>
> Modulo introducing a new top-level command (a subcommand of `git remote`
> would make much more sense and make the feature eminently more
> discoverable), and modulo allowing patterns in the ref to match, I agree."git remote" is primarily about "I have this remote---tell me more about it", but this query goes in the other direction, and that is why I threw a non-existing command to solicit alternatives that are potentially better than "git remote".
FWIW, I did not have any opinion on where the feature should appear or what the syntax to query the remote.<nick>.fetch refmap should be, when I wrote the above. I still do not (yet) have a strong opinion.
I do not oppose to the "find remotes I can fetch from to update these remote-tracking branches" feature existing. I just wanted to make sure whoever will work on it is aware of the fact that they must consider the case with overlapping destinations.
Thanks.