git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Fix 'url.*.insteadOf' for submodule URLs
@ 2008-08-03 22:57 Johan Herland
  2008-08-03 23:00 ` [PATCH 1/5] Add testcase for 'git submodule' with url.*.insteadOf set in the super-repo Johan Herland
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Johan Herland @ 2008-08-03 22:57 UTC (permalink / raw)
  To: git, Junio C Hamano

As suggested in a thread some time ago, one could redefine the URL used to 
fetch submodules by adding a 'url.*.insteadOf' rule prior to the first 
invocation of 'git submodule update'.

However, this does not work with current Git, because the super-repo config 
(which is home to the 'url.*.insteadOf' rule) is not consulted by the 'git 
clone' that is invoked by 'git submodule update'.

These patches fix this issue by making 'git submodule' explicitly rewrite 
the submodule URL according to the super-repo config, prior to calling 'git 
clone'.

In order for the 'git submodule' shell script to properly rewrite URLs, it 
must gain access to the URL rewriting functionality in remote.c. To expose 
the URL rewriting functionality to 'git submodule' (and others, if needed), 
a new option ('rewrite-url') has been added to 'git config'.

The patch series is based on master. Whether or not this should be 
considered for v1.6.0 is to be decided by Junio. (My personal opinion is 
that although we're late in the release cycle, the patches are fairly 
straightforward, and should not pose a great risk of regressions.)

Johan Herland (5):
  Add testcase for 'git submodule' with url.*.insteadOf set in the
    super-repo
  Teach 'git config' to rewrite URLs according to current
    url.*.insteadOf rules
  Add selftest for new option '--rewrite-url' to 'git config'
  Add documentation on the new --rewrite-url option to 'git config'
  Teach 'git submodule' to rewrite submodule URLs according to
    super-repo's rules

 Documentation/git-config.txt |   10 ++++++++++
 builtin-config.c             |   23 ++++++++++++++++++++++-
 git-submodule.sh             |    6 ++++++
 t/t1300-repo-config.sh       |   14 ++++++++++++++
 t/t7400-submodule-basic.sh   |   11 +++++++++++
 5 files changed, 63 insertions(+), 1 deletions(-)


Have fun!

...Johan

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

end of thread, other threads:[~2008-08-04  8:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-03 22:57 [PATCH 0/5] Fix 'url.*.insteadOf' for submodule URLs Johan Herland
2008-08-03 23:00 ` [PATCH 1/5] Add testcase for 'git submodule' with url.*.insteadOf set in the super-repo Johan Herland
2008-08-03 23:04   ` [PATCH 1/5 v2] " Johan Herland
2008-08-03 23:01 ` [PATCH 2/5] Teach 'git config' to rewrite URLs according to current url.*.insteadOf rules Johan Herland
2008-08-03 23:02 ` [PATCH 3/5] Add selftest for new option '--rewrite-url' to 'git config' Johan Herland
2008-08-03 23:02 ` [PATCH 4/5] Add documentation on the new --rewrite-url option " Johan Herland
2008-08-03 23:02 ` [PATCH 5/5] Teach 'git submodule' to rewrite submodule URLs according to super-repo's rules Johan Herland
2008-08-03 23:27 ` [PATCH 0/5] Fix 'url.*.insteadOf' for submodule URLs Johannes Schindelin
2008-08-03 23:47   ` Johan Herland
2008-08-04  2:06     ` Junio C Hamano
2008-08-04  7:52       ` Johan Herland
2008-08-03 23:57   ` Junio C Hamano

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