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

Re: [PATCH] Clarify role of init command in git-submodules documentation

From
SVSven Verdoolaege <skimo@kotnet.org>
Date
Aug 20, 2007, 07:54 UTC
Message-ID
<20070820075459.GY1070MdfPADPa@greensroom.kotnet.org>
In-Reply-To
<11875937841178-git-send-email-madduck@madduck.net>
On Mon, Aug 20, 2007 at 09:09:44AM +0200, martin f. krafft wrote:
Show 7 quoted lines
>  FILES
>  -----
> -When initializing submodules, a .gitmodules file in the top-level directory
> -of the containing repository is used to find the url of each submodule.
> -This file should be formatted in the same way as $GIR_DIR/config. The key
> -to each submodule url is "submodule.$name.url".
> +To work with submodules, a user has to prepare a repository clone with the
I think this is a bit ambiguous.
> +command `git-submodule init`. This command copies the url of each submodule

As you can see in the "init" section of the man pages, the url is only copied if it's not there already.

Show 8 quoted lines
> +listed in the .gitmodules file in the top-level directory of the containing
> +repository to $GIT_DIR/config. The key to each submodule url is
> +"submodule.$name.url".
> +
> +The .gitmodules file then specifies the location of each submodule with
> +respect to the repository (and is shared among all contributors), while the
> +url of each submodule comes from the local configuration in $GIT_DIR/config
> +and can thus be modified independently of all other users.

This is better than the previous version, but in my mind still a bit confusing. Let me have a go:

.gitmodules::
	This file specifies the location of each submodule with respect
	to the top-level directory of the git working tree as well as
	the default url of each submodule.  This default url is ignored
	by all git submodule subcommands, except init.  The latter can
	be used to initialize the url in $GIR_DIR/config, which is the
	url used by the other subcommands.  This file is typically
	tracked as it contains information that is shared by all
	contributors.  See also: gitlink:gitmodules[5].
$GIT_DIR/config::
	This files contains the url of each submodule in "submodule.$name.url".
	These urls are required by git submodule subcommands such as update
	and can be initialized by calling "git submodule init".
	The urls are specified in the local $GIT_DIR/config as the most
	appropriate url to get updates from may by different for different users
	and should not depend on the particular revision of the superproject
	that is currently checked out.
skimo
Previous: martin f. krafftNext: Junio C Hamano
Message 6 of 13 in “clarify need for init in git-submodules documentation”
  1. clarify need for init in git-submodules documentationmartin f. krafft, Aug 16, 2007
  2. Sven VerdoolaegeAug 17, 2007
  3. martin f krafftAug 17, 2007
  4. Sven VerdoolaegeAug 17, 2007
  5. Clarify role of init command in git-submodules documentationmartin f. krafft, Aug 20, 2007
  6. Sven VerdoolaegeAug 20, 2007
  7. Junio C HamanoAug 20, 2007
  8. martin f krafftAug 21, 2007
  9. Sven VerdoolaegeAug 21, 2007
  10. martin f krafftAug 21, 2007
  11. Sven VerdoolaegeAug 22, 2007
  12. martin f krafftAug 22, 2007
  13. Not setting M-F-T, keeping people on Cc (was: [PATCH] clarify need for init in git-submodules documentation)martin f krafft, Aug 20, 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.