git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Tao Klerks <tao@klerks.biz>, git <git@vger.kernel.org>
Subject: Re: Plumbing for mapping from a remote tracking ref to the remote ref?
Date: Sat, 18 Jun 2022 16:04:12 -0700	[thread overview]
Message-ID: <xmqqczf5lgk3.fsf@gitster.g> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.2206182358350.349@tvgsbejvaqbjf.bet> (Johannes Schindelin's message of "Sun, 19 Jun 2022 00:04:08 +0200 (CEST)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> 	$ 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.

  reply	other threads:[~2022-06-18 23:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 19:12 Plumbing for mapping from a remote tracking ref to the remote ref? Tao Klerks
2022-06-15 20:18 ` Junio C Hamano
2022-06-18 22:04   ` Johannes Schindelin
2022-06-18 23:04     ` Junio C Hamano [this message]
2023-09-03  7:16       ` Tao Klerks
2023-09-05 22:18         ` Junio C Hamano
2023-09-06  4:21           ` Tao Klerks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqczf5lgk3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=tao@klerks.biz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).