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

Re: git submodule init and redundant data in .gitmodules/.git/config

From
SVSven Verdoolaege <skimo@kotnet.org>
Date
Aug 15, 2007, 16:38 UTC
Message-ID
<20070815163822.GC1070MdfPADPa@greensroom.kotnet.org>
In-Reply-To
<20070815162005.GA18463@piper.oerlikon.madduck.net>
On Wed, Aug 15, 2007 at 06:20:05PM +0200, martin f krafft wrote:
Show 8 quoted lines
> But looking at the two stanzas, it strikes me that the remote url of
> the submodule is duplicated and detached, creating redundant data
> which may become desynchronised.
> 
> Why is this?
> 
> What is the reason for git-submodule init and moving the data to
> .git/config?

The (most appropriate) URL from which to get updates of a submodule may be different for different people and therefore has to be stored in .git/config. It was then decided that the default value for this URL should be stored in .gitmodules. git submodule init simply initializes the URL using this default value. You are free to not call git submodule init and set a (more) appropriate URL manually.

skimo
Previous: martin f krafftNext: martin f krafft
Message 2 of 7 in “git submodule init and redundant data in .gitmodules/.git/config”
  1. martin f krafftAug 15, 2007
  2. Sven VerdoolaegeAug 15, 2007
  3. using .gitmodule as default (was: git submodule init and redundant data in .gitmodules/.git/config)martin f krafft, Aug 15, 2007
  4. Josef WeidendorferAug 16, 2007
  5. martin f krafftAug 16, 2007
  6. Josef WeidendorferAug 16, 2007
  7. Lars HjemliAug 17, 2007

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.