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

Re: [PATCH 0/5] Fix 'url.*.insteadOf' for submodule URLs

From
Johan Herland <johan@herland.net>
Date
Aug 3, 2008, 23:47 UTC
Message-ID
<200808040147.16797.johan@herland.net>
In-Reply-To
<alpine.DEB.1.00.0808040126170.9611@pacific.mpi-cbg.de.mpi-cbg.de>
On Monday 04 August 2008, Johannes Schindelin wrote:
Show 7 quoted lines
> On Mon, 4 Aug 2008, Johan Herland wrote:
> > 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'.
>
> If I suggested it, but forgot the "--global" flag to "git config", I
> apologize.

Does this mean that you don't agree with the rationale for this patch? I.e. that submodule URLs should not be rewritten according to the rules in the super-repo (but instead require such rules to be set in the user's global config)?

There are (at least) two reasons for why I think this should work without having to use '--global':

1. Consistency: Other git commands in the supermodule does _not_ require the 
URL rewriting rule to reside in the global config. Why should 'git 
submodule' be different.
2. I believe there are valid use cases for adding URL rewriting rules to the 
repo config instead of the global config. You may want to check out Fred's 
version of project X (including submodules), without making your other 
clones of project X start cloning/fetching from Fred.

Puzzled, ...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Johannes SchindelinNext: Junio C Hamano
Message 9 of 12 in “Fix 'url.*.insteadOf' for submodule URLs”
  1. 0/5 Fix 'url.*.insteadOf' for submodule URLsJohan Herland, Aug 3, 2008
  2. 1/5 Add testcase for 'git submodule' with url.*.insteadOf set in the super-repoJohan Herland, Aug 3, 2008
  3. 1/5 Add testcase for 'git submodule' with url.*.insteadOf set in the super-repoJohan Herland, Aug 3, 2008
  4. 2/5 Teach 'git config' to rewrite URLs according to current url.*.insteadOf rulesJohan Herland, Aug 3, 2008
  5. 3/5 Add selftest for new option '--rewrite-url' to 'git config'Johan Herland, Aug 3, 2008
  6. 4/5 Add documentation on the new --rewrite-url option to 'git config'Johan Herland, Aug 3, 2008
  7. 5/5 Teach 'git submodule' to rewrite submodule URLs according to super-repo's rulesJohan Herland, Aug 3, 2008
  8. Johannes SchindelinAug 3, 2008
  9. Johan HerlandAug 3, 2008
  10. Junio C HamanoAug 4, 2008
  11. Johan HerlandAug 4, 2008
  12. Junio C HamanoAug 3, 2008

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.