git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Johannes SchindelinNext: Tao Klerks
Message 4 of 7 in “Plumbing for mapping from a remote tracking ref to the remote ref?”
  1. Tao KlerksJun 15, 2022
  2. Junio C HamanoJun 15, 2022
  3. Johannes SchindelinJun 18, 2022
  4. Junio C HamanoJun 18, 2022
  5. Tao KlerksSep 3, 2023
  6. Junio C HamanoSep 5, 2023
  7. Tao KlerksSep 6, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.