{"thread":{"id":"33828","subject":"[PATCHv2] git-submodule.txt: Clarify 'init' and 'add' subcommands.","startedAt":"2013-05-15T22:28:39Z","lastAt":"2013-05-16T18:50:58Z","messageCount":2,"participants":["Dale R. Worley","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"217480","messageId":"201305152246.r4FMkVW5005582@freeze.ariadne.com","threadId":"33828","inReplyTo":null,"subject":"[PATCHv2] git-submodule.txt: Clarify 'init' and 'add' subcommands.","fromName":"Dale R. Worley","fromEmail":"worley@alum.mit.edu","sentAt":"2013-05-15T22:28:39Z","receivedAt":"2013-05-15T22:28:39Z","isPatch":false,"sender":{"key":"worley@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/19911107?v=4"},"body":"Describe how 'add' sets the submodule's logical name, which is used in\nthe configuration entry names.\n\nClarify that 'init' only sets up the configuration entries for\nsubmodules that have already been added elsewhere.  Describe that\n<path> arguments limit the submodules that are configured.\n\nSigned-off-by: Dale Worley <worley@ariadne.com>\n---\nThis patch seems to have all the features that we have discussed:\n\n- Describes how 'add' selects the submodule logical name, including\n  the effect of --name.  (My first patch was on a version of Git that\n  did not support --name, so I didn't know of it.)\n\n- Corrects description of 'init' to clarify that its behavior is\n  driven by the gitlinks recorded in the index, rather than implying\n  it is driven by the contents of .gitmodules.\n\n- Describes 'init' behavior to be driven by the index, rather than my\n  previous incorrect use of \"file tree\".  (Of course, gitlinks aren't\n  visible in the file tree.)\n\n- Updated text for 'init' is shorter and less technical than my\n  previous patch.\n\n- Since \"(which were added and committed elsewhere)\" is stated in the\n  first sentence, I've removed the later sentence explaining that\n  submodules must be added before they can be inited.\n\n- Explains the effect of <path> arguments to 'init' subcommand.\n\n Documentation/git-submodule.txt |    8 ++++++--\n 1 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\nindex c99d795..83235c0 100644\n--- a/Documentation/git-submodule.txt\n+++ b/Documentation/git-submodule.txt\n@@ -76,6 +76,8 @@ argument <path> is the relative location for the cloned submodule\n to exist in the superproject. If <path> is not given, the\n \"humanish\" part of the source repository is used (\"repo\" for\n \"/path/to/repo.git\" and \"foo\" for \"host.xz:foo/.git\").\n+The <path> is also used as the submodule's logical name in its\n+configuration entries unless `--name` is used to specify a logical name.\n +\n <repository> is the URL of the new submodule's origin repository.\n This may be either an absolute URL, or (if it begins with ./\n@@ -123,8 +125,10 @@ linkgit:git-status[1] and linkgit:git-diff[1] will provide that information\n too (and can also report changes to a submodule's work tree).\n \n init::\n-\tInitialize the submodules, i.e. register each submodule name\n-\tand url found in .gitmodules into .git/config.\n+\tInitialize the submodules recorded in the index (which were\n+\tadded and committed elsewhere) by copying submodule\n+\tnames and urls from .gitmodules to .git/config.\n+\tOptional <path> arguments limit which submodules will be initialized.\n \tIt will also copy the value of `submodule.$name.update` into\n \t.git/config.\n \tThe key used in .git/config is `submodule.$name.url`.\n-- \n1.7.7.6\n"},{"id":"217636","messageId":"51952A92.5030009@web.de","threadId":"33828","inReplyTo":"201305152246.r4FMkVW5005582@freeze.ariadne.com","subject":"Re: [PATCHv2] git-submodule.txt: Clarify 'init' and 'add' subcommands.","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2013-05-16T18:50:58Z","receivedAt":"2013-05-16T18:50:58Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 16.05.2013 00:28, schrieb Dale R. Worley:\n> Describe how 'add' sets the submodule's logical name, which is used in\n> the configuration entry names.\n> \n> Clarify that 'init' only sets up the configuration entries for\n> submodules that have already been added elsewhere.  Describe that\n> <path> arguments limit the submodules that are configured.\n> \n> Signed-off-by: Dale Worley <worley@ariadne.com>\n\nThanks, this patch addresses all issues raised.\n\nAcked-by: Jens Lehmann <Jens.Lehmann@web.de>\n\n> ---\n> This patch seems to have all the features that we have discussed:\n> \n> - Describes how 'add' selects the submodule logical name, including\n>   the effect of --name.  (My first patch was on a version of Git that\n>   did not support --name, so I didn't know of it.)\n> \n> - Corrects description of 'init' to clarify that its behavior is\n>   driven by the gitlinks recorded in the index, rather than implying\n>   it is driven by the contents of .gitmodules.\n> \n> - Describes 'init' behavior to be driven by the index, rather than my\n>   previous incorrect use of \"file tree\".  (Of course, gitlinks aren't\n>   visible in the file tree.)\n> \n> - Updated text for 'init' is shorter and less technical than my\n>   previous patch.\n> \n> - Since \"(which were added and committed elsewhere)\" is stated in the\n>   first sentence, I've removed the later sentence explaining that\n>   submodules must be added before they can be inited.\n> \n> - Explains the effect of <path> arguments to 'init' subcommand.\n> \n>  Documentation/git-submodule.txt |    8 ++++++--\n>  1 files changed, 6 insertions(+), 2 deletions(-)\n> \n> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\n> index c99d795..83235c0 100644\n> --- a/Documentation/git-submodule.txt\n> +++ b/Documentation/git-submodule.txt\n> @@ -76,6 +76,8 @@ argument <path> is the relative location for the cloned submodule\n>  to exist in the superproject. If <path> is not given, the\n>  \"humanish\" part of the source repository is used (\"repo\" for\n>  \"/path/to/repo.git\" and \"foo\" for \"host.xz:foo/.git\").\n> +The <path> is also used as the submodule's logical name in its\n> +configuration entries unless `--name` is used to specify a logical name.\n>  +\n>  <repository> is the URL of the new submodule's origin repository.\n>  This may be either an absolute URL, or (if it begins with ./\n> @@ -123,8 +125,10 @@ linkgit:git-status[1] and linkgit:git-diff[1] will provide that information\n>  too (and can also report changes to a submodule's work tree).\n>  \n>  init::\n> -\tInitialize the submodules, i.e. register each submodule name\n> -\tand url found in .gitmodules into .git/config.\n> +\tInitialize the submodules recorded in the index (which were\n> +\tadded and committed elsewhere) by copying submodule\n> +\tnames and urls from .gitmodules to .git/config.\n> +\tOptional <path> arguments limit which submodules will be initialized.\n>  \tIt will also copy the value of `submodule.$name.update` into\n>  \t.git/config.\n>  \tThe key used in .git/config is `submodule.$name.url`.\n> \n"}]}