git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] URL rewrite in .gitmodules
@ 2015-10-19 19:28 Lars Schneider
  2015-10-19 22:07 ` Stefan Beller
  2015-10-20 17:33 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Lars Schneider @ 2015-10-19 19:28 UTC (permalink / raw)
  To: Git Users

Hi,

I have a closed source Git repo which references an Open Source Git repo as Submodule. The Open Source Git repo references yet another Open Source repo as submodule. In order to avoid failing builds due to external services I mirrored the Open Source repos in my company network. That works great with the first level of Submodules. Unfortunately it does not work with the second level because the first level still references the "outside of company" repos. I know I can rewrite Git URLs with the git config "url.<base>.insteadOf" option. However, git configs are client specific. I would prefer a solution that works without setup on any client. I also know that I could update the .gitmodules file in the Open Source repo on the first level. I also would prefer not to do this as I want to use the
  very same hashes as defined by the "upstream" Open Source repos.

Is there yet another way in Git to change URLs of Submodules in the way I want it?

If not, what do you think about a patch that adds a "url" section similar to the one in git config to a .gitmodules file?

Example:
----------
[submodule "git"]
	path = git
        url=git://github.com/larsxschneider/git.git

[url "mycompany.com"]
        insteadOf = outside.com
----------

Thanks,
Lars

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-15 13:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 19:28 [RFC] URL rewrite in .gitmodules Lars Schneider
2015-10-19 22:07 ` Stefan Beller
2015-10-25 14:43   ` Lars Schneider
2015-10-20 17:33 ` Junio C Hamano
2015-10-25 15:12   ` Lars Schneider
2015-10-26 16:34     ` Stefan Beller
2015-10-26 16:52       ` Jens Lehmann
2015-11-15 13:16         ` Lars Schneider

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