From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: git@vger.kernel.org, Borislav Petkov <bp@alien8.de>
Subject: Re: insteadOf and git-request-pull output
Date: Fri, 16 Nov 2018 11:56:39 +0000 [thread overview]
Message-ID: <20181116115639.GO890086@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20181115182826.GB25806@pure.paranoia.local>
[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]
On Thu, Nov 15, 2018 at 01:28:26PM -0500, Konstantin Ryabitsev wrote:
> Hi, all:
>
> Looks like setting url.insteadOf rules alters the output of
> git-request-pull. I'm not sure that's the intended use of insteadOf,
> which is supposed to replace URLs for local use, not to expose them
> publicly (but I may be wrong). E.g.:
>
> $ git request-pull HEAD^ git://foo.example.com/example | grep example
> git://foo.example.com/example
>
> $ git config url.ssh://bar.insteadOf git://foo
>
> $ git request-pull HEAD^ git://foo.example.com/example | grep example
> ssh://bar.example.com/example
>
> I think that if we use the "principle of least surprise," insteadOf
> rules shouldn't be applied for git-request-pull URLs.
I'd like to point out a different use that may change your view. I have
an insteadOf alias, gh:, that points to GitHub. Performing the rewrite
is definitely the right thing to do, since other users may not have my
alias available.
I agree that in your case, a rewrite seems less appropriate, but I think
we should only skip the rewrite if the value already matches a valid
URL.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]
next prev parent reply other threads:[~2018-11-16 11:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 18:28 insteadOf and git-request-pull output Konstantin Ryabitsev
2018-11-15 18:54 ` Ævar Arnfjörð Bjarmason
2018-11-15 19:26 ` Konstantin Ryabitsev
2018-11-16 4:10 ` Junio C Hamano
2018-11-16 11:56 ` brian m. carlson [this message]
2018-11-17 7:46 ` Junio C Hamano
2018-11-17 12:27 ` Jeff King
2018-11-17 14:07 ` Junio C Hamano
2018-11-22 17:31 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181116115639.GO890086@genre.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=bp@alien8.de \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).