git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Toon Claes <toon@iotcl.com>
Cc: git@vger.kernel.org
Subject: Re: URL rewrites for submodules
Date: Mon, 10 Feb 2020 14:04:40 -0800	[thread overview]
Message-ID: <xmqqv9oexfnr.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <87wo8ucgar.fsf@iotcl.com> (Toon Claes's message of "Mon, 10 Feb 2020 21:56:28 +0100")

Toon Claes <toon@iotcl.com> writes:

> Hi,
>
> I recently learned about rewriting URLs. Pretty cool feature. Learned
> about it here:
> https://jonhnnyweslley.net/blog/how-to-rewrite-git-urls-to-clone-faster-and-push-safer/ 
>
> But I've been doing some testing, and this feature does not seem to work
> for git submodules. Is it like that by design, so are there technical or
> practical limitation why we would not like to have this feature on
> submodules too?

Wouldn't these submodules have their own .git/config where you can
define the rewrite rules?  It depends on why you use the rewriting
rules but some common reasons why you rewrite URL A to URL B would
apply regardless of which project hosted at A you are accessing,
namely, performance and convenience.  And in such a case, you do not
necessarily want to have the rewrite config in the per-repository
configuration file of the top-level superproject.  If you define
them instead in $HOME/.gitconfig, that would apply equally to all
repositories you would access.

  reply	other threads:[~2020-02-10 22:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 20:56 URL rewrites for submodules Toon Claes
2020-02-10 22:04 ` Junio C Hamano [this message]
2020-02-11 21:02   ` Toon Claes
2020-02-12  1:35     ` Jonathan Nieder

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=xmqqv9oexfnr.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=toon@iotcl.com \
    /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).