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

Re: insteadOf and git-request-pull output

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 16, 2018, 04:10 UTC
Message-ID
<xmqqbm6pll28.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20181115192624.GA18204@pure.paranoia.local>
Konstantin Ryabitsev <konstantin@linuxfoundation.org> writes:
Show 13 quoted lines
> On Thu, Nov 15, 2018 at 07:54:32PM +0100, Ævar Arnfjörð Bjarmason wrote:
>> > I think that if we use the "principle of least surprise," insteadOf
>> > rules shouldn't be applied for git-request-pull URLs.
>> 
>> I haven't used request-pull so I don't have much of an opinion on this,
>> but do you think the same applies to 'git remote get-url <remote>'?
>> 
>> I.e. should it also show the original unmunged URL, or the munged one as
>> it does now?
>
> I don't know, maybe both? As opposed to git-request-pull, this is not
> exposing the insteadOf URL to someone other than the person who set it
> up, so even if it does return the munged URL, it wouldn't be unexpected.

Yeah, I think the local "git remote" should show the rewritten URL (because that information is not available otherwise) and it is OK to optionally show the original. Also, I think it would be nice if request-pull gave external-facing names. After all, insteadOf address is for your own use (e.g. maybe pointing at corporate mirror), and not for the intended recipient of request-pull.

In short, I think I agree with things you are saying in this exchange.

Previous: Konstantin RyabitsevNext: brian m. carlson
Message 4 of 9 in “insteadOf and git-request-pull output”
  1. Konstantin RyabitsevNov 15, 2018
  2. Ævar Arnfjörð BjarmasonNov 15, 2018
  3. Konstantin RyabitsevNov 15, 2018
  4. Junio C HamanoNov 16, 2018
  5. brian m. carlsonNov 16, 2018
  6. Junio C HamanoNov 17, 2018
  7. Jeff KingNov 17, 2018
  8. Junio C HamanoNov 17, 2018
  9. Jeff KingNov 22, 2018

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.