{"thread":{"id":"8343","subject":"[PATCH] Let .git/config specify the url for submodules","startedAt":"2007-05-28T20:51:23Z","lastAt":"2007-07-25T23:49:02Z","messageCount":31,"participants":["Lars Hjemli","Junio C Hamano","Josef Weidendorfer","Sven Verdoolaege","Linus Torvalds","Johannes Schindelin","Ricky Nite"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"43518","messageId":"1180385483418-git-send-email-hjemli@gmail.com","threadId":"8343","inReplyTo":null,"subject":"[PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-05-28T20:51:23Z","receivedAt":"2007-05-28T20:51:23Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"This changes git-submodule in a few ways:\na. Section names in .gitmodules are now called 'path', not 'module'.\nb. Each 'path' section is required to have a 'submodule' key, used to\n   give the submodule a name.\nc. During 'git-submodule init', the submodule name and url is found in\n   .gitmodules and stored in .git/config under the key 'submodule.$name.url'.\n   The 'init' command does not clone the submodule.\nd. A new git-submodule command, 'clone', will map submodule path to submodule\n   name in .gitmodules and use the name to find a url for the submodule in\n   .git/config. This url is then used to clone the submodule before checking\n   out the commit named in the index of the containing repository.\n\nThe main reason for these changes is to make it easier to specify alternate\nurls for a submodule without touching .gitmodules, i.e. like this:\n\n  $ git submodule init\n  $ git config submodule.foobar.url /pub/git/foobar.git\n  $ git submodule clone\n\nIt also might turn out to be nice to have submodules identified by a 'logical\nname' instead of by path when a single path is used for different submodules\nin different versions of a 'superproject', and if/when the submodules gets\ncloned somewhere below .git of the containing repository.\n\nSigned-off-by: Lars Hjemli <hjemli@gmail.com>\n---\n\nThis is on top of my previous 'submodule test-script' patch (which was on top\nof 'next', sorry for not mentioning this in the mail).\n\n\n Documentation/git-submodule.txt |   36 ++++++++-----\n git-submodule.sh                |  109 ++++++++++++++++++++++++++++-----------\n t/t7400-submodule-basic.sh      |   69 ++++++++++++++++--------\n 3 files changed, 148 insertions(+), 66 deletions(-)\n\ndiff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\nindex cb0424f..c93e40f 100644\n--- a/Documentation/git-submodule.txt\n+++ b/Documentation/git-submodule.txt\n@@ -8,7 +8,7 @@ git-submodule - Initialize, update or inspect submodules\n \n SYNOPSIS\n --------\n-'git-submodule' [--quiet] [--cached] [status|init|update] [--] [<path>...]\n+'git-submodule' [--quiet] [--cached] [status|init|clone|update] [--] [<path>...]\n \n \n COMMANDS\n@@ -16,22 +16,25 @@ COMMANDS\n status::\n \tShow the status of the submodules. This will print the SHA-1 of the\n \tcurrently checked out commit for each submodule, along with the\n-\tsubmodule path and the output of gitlink:git-describe[1] for the\n-\tSHA-1. Each SHA-1 will be prefixed with `-` if the submodule is not\n-\tinitialized and `+` if the currently checked out submodule commit\n+\tsubmodule name, path and the output of gitlink:git-describe[1] for\n+\tthe SHA-1. Each SHA-1 will be prefixed with `-` if the submodule is\n+\tnot initialized and `+` if the currently checked out submodule commit\n \tdoes not match the SHA-1 found in the index of the containing\n \trepository. This command is the default command for git-submodule.\n \n init::\n-\tInitialize the submodules, i.e. clone the git repositories specified\n-\tin the .gitmodules file and checkout the submodule commits specified\n-\tin the index of the containing repository. This will make the\n-\tsubmodules HEAD be detached.\n+\tInitialize the submodules, i.e. register the submodules and their\n+\tsuggested urls in $GIT_DIR/config of the containing repository.\n+\n+clone::\n+\tClone the initialized git repositories and checkout the submodule\n+\tcommits specified in the index of the containing repository. This\n+\twill make the submodule HEADs be detached.\n \n update::\n \tUpdate the initialized submodules, i.e. checkout the submodule commits\n \tspecified in the index of the containing repository. This will make\n-\tthe submodules HEAD be detached.\n+\tthe submodule HEADs be detached.\n \n \n OPTIONS\n@@ -48,18 +51,25 @@ OPTIONS\n \tPath to submodule(s). When specified this will restrict the command\n \tto only operate on the submodules found at the specified paths.\n \n+\n FILES\n -----\n-When cloning submodules, a .gitmodules file in the top-level directory\n-of the containing repository is used to find the url of each submodule.\n-This file should be formatted in the same way as $GIR_DIR/config. The key\n-to each submodule url is \"module.$path.url\".\n+git-submodule uses a file named .gitmodules in the top-level directory of the\n+containing repository. This file should be formatted in the same way as\n+$GIR_DIR/config.\n+\n+The .gitmodules file is used to find the name and suggested url for each\n+submodule path, using the keys `path.$path.submodule` and 'path.$path.url'.\n+The submodule name and url is stored in $GIT_DIR/config by\n+`git-submodule init`, using the key `submodule.$name.url`, and this key is\n+then used during `git-submodule clone` to lookup the preferred submodule url.\n \n \n AUTHOR\n ------\n Written by Lars Hjemli <hjemli@gmail.com>\n \n+\n GIT\n ---\n Part of the gitlink:git[7] suite\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 6ed5a6c..31de80e 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -4,11 +4,12 @@\n #\n # Copyright (c) 2007 Lars Hjemli\n \n-USAGE='[--quiet] [--cached] [status|init|update] [--] [<path>...]'\n+USAGE='[--quiet] [--cached] [status|init|clone|update] [--] [<path>...]'\n . git-sh-setup\n require_work_tree\n \n init=\n+clone=\n update=\n status=\n quiet=\n@@ -26,7 +27,7 @@ say()\n }\n \n #\n-# Run clone + checkout on missing submodules\n+# Register submodules in .git/config\n #\n # $@ = requested paths (default to all)\n #\n@@ -35,9 +36,56 @@ modules_init()\n \tgit ls-files --stage -- \"$@\" | grep -e '^160000 ' |\n \twhile read mode sha1 stage path\n \tdo\n+\t\t# Get the submodule name for this path\n+\t\tname=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".submodule)\n+\t\ttest -z \"$name\" && die \"Unnamed submodule at path '$path'\"\n+\n+\t\t# Skip registered submodules\n+\t\turl=$(git-config submodule.\"$name\".url)\n+\t\ttest -z \"$url\" || continue\n+\n+\t\t# find suggested url in .gitmodules\n+\t\turl=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".url)\n+\t\ttest -z \"$url\" &&\n+\t\tdie \"No url found for submodule '$name' (path '$path') in .gitmodules\"\n+\n+\t\t# Save the url in local config, indicating that this\n+\t\t# submodule is now registered (and enabling the user to\n+\t\t# override the url before running 'git submodule clone'\n+\t\tgit-config submodule.\"$name\".url \"$url\" ||\n+\t\tdie \"Failed to register url '$url' for submodule '$name'\"\n+\n+\t\tsay \"Submodule '$name' registered for path '$path', using url '$url'\"\n+\tdone\n+}\n+\n+#\n+# Run clone + checkout on missing submodules\n+#\n+# $@ = requested paths (default to all)\n+#\n+modules_clone()\n+{\n+\tgit ls-files --stage -- \"$@\" | grep -e '^160000 ' |\n+\twhile read mode sha1 stage path\n+\tdo\n+\t\t# Get the submodule name for this path\n+\t\tname=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".submodule)\n+\t\ttest -z \"$name\" && die \"Unnamed submodule at path '$path'\"\n+\n+\t\t# Get the url for the module from local config\n+\t\turl=$(git-config submodule.\"$name\".url)\n+\t\tif test -z \"$url\"\n+\t\tthen\n+\t\t\t# If this path was specified on the command line,\n+\t\t\t# make sure the user gets a proper errormessage.\n+\t\t\ttest \"$#\" != \"$0\" &&\n+\t\t\tdie \"Submodule '$name' (path '$path') not initialized\"\n+\n+\t\t\tcontinue\n+\t\tfi\n+\n \t\t# Skip submodule paths that already contain a .git directory.\n-\t\t# This will also trigger if $path is a symlink to a git\n-\t\t# repository\n \t\ttest -d \"$path\"/.git && continue\n \n \t\t# If there already is a directory at the submodule path,\n@@ -54,28 +102,17 @@ modules_init()\n \t\ttest -e \"$path\" &&\n \t\tdie \"A file already exist at path '$path'\"\n \n-\t\turl=$(GIT_CONFIG=.gitmodules git-config module.\"$path\".url)\n-\t\ttest -z \"$url\" &&\n-\t\tdie \"No url found for submodule '$path' in .gitmodules\"\n-\n-\t\t# MAYBE FIXME: this would be the place to check GIT_CONFIG\n-\t\t# for a preferred url for this submodule, possibly like this:\n-\t\t#\n-\t\t# modname=$(GIT_CONFIG=.gitmodules git-config module.\"$path\".name)\n-\t\t# alturl=$(git-config module.\"$modname\".url)\n-\t\t#\n-\t\t# This would let the versioned .gitmodules file use the submodule\n-\t\t# path as key, while the unversioned GIT_CONFIG would use the\n-\t\t# logical modulename (if present) as key. But this would need\n-\t\t# another fallback mechanism if the module wasn't named.\n+\t\t# Use the submodule name to find the preferred url in local config\n+\t\turl=$(git-config submodule.\"$name\".url)\n+\t\ttest -z \"$url\" && die \"No url found for submodule '$name' (path '$path')\"\n \n \t\tgit-clone -n \"$url\" \"$path\" ||\n-\t\tdie \"Clone of submodule '$path' failed\"\n+\t\tdie \"Clone of submodule '$name' (path '$path') failed\"\n \n \t\t(unset GIT_DIR && cd \"$path\" && git-checkout -q \"$sha1\") ||\n-\t\tdie \"Checkout of submodule '$path' failed\"\n+\t\tdie \"Checkout of '$sha1' in submodule '$name' (path '$path') failed\"\n \n-\t\tsay \"Submodule '$path' initialized\"\n+\t\tsay \"Submodule '$name' (path '$path') cloned and checked out\"\n \tdone\n }\n \n@@ -94,27 +131,33 @@ modules_update()\n \t\t\t# Only mention uninitialized submodules when its\n \t\t\t# path have been specified\n \t\t\ttest \"$#\" != \"0\" &&\n-\t\t\tsay \"Submodule '$path' not initialized\"\n+\t\t\tsay \"Submodule in directory '$path' not initialized\"\n \t\t\tcontinue;\n \t\tfi\n+\n+\t\t# Get the module name for this path\n+\t\tname=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".submodule)\n+\t\ttest -z \"$name\" && die \"Unnamed submodule at path '$path'\"\n+\n+\t\t# Get the SHA-1 of the submodule HEAD\n \t\tsubsha1=$(unset GIT_DIR && cd \"$path\" &&\n \t\t\tgit-rev-parse --verify HEAD) ||\n-\t\tdie \"Unable to find current revision of submodule '$path'\"\n+\t\tdie \"Unable to find current revision of submodule '$module' (path '$path')\"\n \n \t\tif test \"$subsha1\" != \"$sha1\"\n \t\tthen\n \t\t\t(unset GIT_DIR && cd \"$path\" && git-fetch &&\n \t\t\t\tgit-checkout -q \"$sha1\") ||\n-\t\t\tdie \"Unable to checkout '$sha1' in submodule '$path'\"\n+\t\t\tdie \"Unable to checkout '$sha1' for submodule '$name' (path '$path')\"\n \n-\t\t\tsay \"Submodule '$path': checked out '$sha1'\"\n+\t\t\tsay \"Submodule '$name' (path '$path'): checked out '$sha1'\"\n \t\tfi\n \tdone\n }\n \n #\n # List all registered submodules, prefixed with:\n-#  - submodule not initialized\n+#  - submodule not initialized or cloned\n #  + different revision checked out\n #\n # If --cached was specified the revision in the index will be printed\n@@ -153,6 +196,9 @@ do\n \tinit)\n \t\tinit=1\n \t\t;;\n+\tclone)\n+\t\tclone=1\n+\t\t;;\n \tupdate)\n \t\tupdate=1\n \t\t;;\n@@ -178,14 +224,17 @@ do\n \tshift\n done\n \n-case \"$init,$update,$status,$cached\" in\n-1,,,)\n+case \"$init,$clone,$update,$status,$cached\" in\n+1,,,,)\n \tmodules_init \"$@\"\n \t;;\n-,1,,)\n+,1,,,)\n+\tmodules_clone \"$@\"\n+\t;;\n+,,1,,)\n \tmodules_update \"$@\"\n \t;;\n-,,*,*)\n+,,,*,*)\n \tmodules_list \"$@\"\n \t;;\n *)\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex a023c87..234f940 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -5,8 +5,8 @@\n \n test_description='Basic submodule support in porcelain\n \n-This test tries to run the init, update and status commands of git-submodule\n-with a known good setup (and two known bad)\n+This test tries to verify basic sanity of the init, clone, update and\n+status commands of git-submodule.\n '\n \n . ./test-lib.sh\n@@ -24,32 +24,57 @@ cd ..\n echo a >a && echo z >z\n git-add a lib z && git-commit -q -m \"super commit 1\"\n \n-# move submodule to another location, register repo url in .gitmodules\n+# move submodule to another location\n mv lib .subrepo\n-GIT_CONFIG=.gitmodules git-config module.lib.url ./.subrepo\n+\n+# register a broken url in .gitmodules\n+GIT_CONFIG=.gitmodules git-config path.lib.url ./broken\n \n test_expect_success 'status is \"missing\"' \\\n \t'git-submodule status | grep \"^-$rev1\"'\n \n-# make sure 'init' will not overwrite a regular file\n-touch lib\n-test_expect_failure 'init fails when path is used by a file' \\\n+# 'init' should fail, since the submodule is unnamed in .gitmodules\n+test_expect_failure 'do not initialize unnamed submodules' \\\n \t'git-submodule init'\n \n-# make sure 'init' will not overwrite a nonempty directory\n+# give the submodule a logical name\n+GIT_CONFIG=.gitmodules git-config path.lib.submodule thelib\n+test_expect_success 'init should register the submodule in .git/config' '\n+\tgit-submodule init &&\n+\turl=$(git-config submodule.thelib.url) &&\n+\ttest \"$url\" = \"./broken\"\n+'\n+\n+# specify correct url in local config\n+git-config submodule.thelib.url ./.subrepo\n+\n+# make sure 'clone' will not overwrite a regular file\n+touch lib\n+test_expect_failure 'clone fails when path is used by a file' \\\n+\t'git-submodule clone'\n+\n+test_expect_success 'the annoying file is preserved' \\\n+\t'test -f lib'\n+\n+# make sure 'clone' will not overwrite a nonempty directory\n rm lib\n mkdir -p lib/foo\n-test_expect_failure 'init fails when path is used by a nonempty directory' \\\n-\t'git-submodule init'\n+test_expect_failure 'clone fails when path is used by a nonempty directory' \\\n+\t'git-submodule clone'\n \n-# turn lib into an empty directory, just like git-checkout would do\n+test_expect_success 'the annoying directory is preserved' \\\n+\t'test -d lib/foo'\n+\n+# make lib be an empty directory, just like git-checkout would have done\n rmdir lib/foo\n-test_expect_success 'init works when path is an empty dir' \\\n-\t'git-submodule init && test -d lib/.git && git-diff --exit-code'\n \n-head=$(cd lib && git-rev-parse HEAD)\n-test_expect_success 'submodule HEAD should match rev1' \\\n-\t'test \"$head\" = \"$rev1\"'\n+test_expect_success 'clone into empty directory should work' \\\n+\t'git-submodule clone'\n+\n+test_expect_success 'submodule HEAD should match rev1' '\n+\thead=$(cd lib && git-rev-parse HEAD) &&\n+\ttest \"$head\" = \"$rev1\"\n+'\n \n test_expect_success 'status is \"up-to-date\" after init' \\\n \t'git-submodule status | grep \"^ $rev1\"'\n@@ -66,15 +91,13 @@ test_expect_success 'status is \"modified\" after submodule commit' \\\n test_expect_success 'the --cached sha1 should be rev1' \\\n \t'git-submodule --cached status | grep \"^\\+$rev1\"'\n \n-test_expect_failure 'git-diff --exit-code reports local modifications' \\\n-\t'git-diff --exit-code'\n-\n-test_expect_success 'update should checkout the correct commit' \\\n+test_expect_success 'after update, there should be no local modifications' \\\n \t'git-submodule update && git-diff --exit-code'\n \n-head=$(cd lib && git-rev-parse HEAD)\n-test_expect_success 'submodule HEAD should match rev1' \\\n-\t'test \"$head\" = \"$rev1\"'\n+test_expect_success 'submodule HEAD should match rev1' '\n+\thead=$(cd lib && git-rev-parse HEAD) &&\n+\ttest \"$head\" = \"$rev1\"\n+'\n \n test_expect_success 'status is \"up-to-date\" after update' \\\n \t'git-submodule status | grep \"^ $rev1\"'\n-- \n1.5.2.74.g6b2d\n"},{"id":"43665","messageId":"8c5c35580705301717h4e9b127fr21ee19764f8ec288@mail.gmail.com","threadId":"8343","inReplyTo":"1180385483418-git-send-email-hjemli@gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-05-31T00:17:30Z","receivedAt":"2007-05-31T00:17:30Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 5/28/07, Lars Hjemli <hjemli@gmail.com> wrote:\n> This changes git-submodule in a few ways:\n\nPlease don't apply the \"Let .git/config specify the url for\nsubmodules\" patch, I'm having second thoughts ;-)\n\nYour design outline in\nhttp://article.gmane.org/gmane.comp.version-control.git/48287 is\nobviously superior, and I'd like to take a stab at it with something\nlike this:\n\n1. 'git-submodule init' saves submodule name and suggested url from\n.gitmodules into .git/config (submodule.$name.url)\n\n2. 'git-submodule update' keeps the work tree updated for submodules\nwith five separate (and optional) operations:\n  a) git-clone --bare $url .git/submodules/$name.git\n  b) git-clone -l -s .git/submodules/$name.git $path\n  c) cd .git/submodules/$name.git && git-fetch\n  d) cd $path && git-fetch\n  e) cd $path && git-checkout $sha1\n\n3) 'git-submodule push' runs something like 'cd $path && git push\norigin $branch', where $branch is found in .gitmodules\n(path.$path.branch).\n\nA remaining issue is how to detect if step 2b is necessary if a\nsubmodule is already checked out at the submodule path, but I guess\nremote.origin.url in the checked out submodule would be the thing to\npeek into.\n\nAlso, step 2c/2d should obviously only be performed if the requested\nsha1 isn't available, which should be trivial to detect with\n'git-cat-file -e'.\n\nCould this turn out to be an acceptable solution?\n\n--\nlarsh\n"},{"id":"43705","messageId":"7vodk01rv6.fsf@assigned-by-dhcp.cox.net","threadId":"8343","inReplyTo":"8c5c35580705301717h4e9b127fr21ee19764f8ec288@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-31T23:43:41Z","receivedAt":"2007-05-31T23:43:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Lars Hjemli\" <hjemli@gmail.com> writes:\n\n> On 5/28/07, Lars Hjemli <hjemli@gmail.com> wrote:\n>> This changes git-submodule in a few ways:\n>\n> Please don't apply the \"Let .git/config specify the url for\n> submodules\" patch, I'm having second thoughts ;-)\n>\n> Your design outline in\n> http://article.gmane.org/gmane.comp.version-control.git/48287 is\n> obviously superior, and I'd like to take a stab at it with something\n> like this:\n>\n> 1. 'git-submodule init' saves submodule name and suggested url from\n> .gitmodules into .git/config (submodule.$name.url)\n>\n> 2. 'git-submodule update' keeps the work tree updated for submodules\n> with five separate (and optional) operations:\n>  a) git-clone --bare $url .git/submodules/$name.git\n>  b) git-clone -l -s .git/submodules/$name.git $path\n>  c) cd .git/submodules/$name.git && git-fetch\n>  d) cd $path && git-fetch\n>  e) cd $path && git-checkout $sha1\n>\n> 3) 'git-submodule push' runs something like 'cd $path && git push\n> origin $branch', where $branch is found in .gitmodules\n> (path.$path.branch).\n>\n> A remaining issue is how to detect if step 2b is necessary if a\n> submodule is already checked out at the submodule path, but I guess\n> remote.origin.url in the checked out submodule would be the thing to\n> peek into.\n>\n> Also, step 2c/2d should obviously only be performed if the requested\n> sha1 isn't available, which should be trivial to detect with\n> 'git-cat-file -e'.\n>\n> Could this turn out to be an acceptable solution?\n\nSounds sane to me, although I have to admit that I cannot really\nclaim that I have thought things through in that strawman you\nquoted.\n"},{"id":"43728","messageId":"200706011008.38063.Josef.Weidendorfer@gmx.de","threadId":"8343","inReplyTo":"8c5c35580705301717h4e9b127fr21ee19764f8ec288@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Josef Weidendorfer","fromEmail":"josef.weidendorfer@gmx.de","sentAt":"2007-06-01T08:08:37Z","receivedAt":"2007-06-01T08:08:37Z","isPatch":true,"sender":{"key":"josef.weidendorfer@gmx.de","avatar":null},"body":"On Thursday 31 May 2007, Lars Hjemli wrote:\n> On 5/28/07, Lars Hjemli <hjemli@gmail.com> wrote:\n> > This changes git-submodule in a few ways:\n> \n> Please don't apply the \"Let .git/config specify the url for\n> submodules\" patch, I'm having second thoughts ;-)\n> \n> Your design outline in\n> http://article.gmane.org/gmane.comp.version-control.git/48287 is\n> obviously superior, and I'd like to take a stab at it with something\n> like this:\n> \n> 1. 'git-submodule init' saves submodule name and suggested url from\n> .gitmodules into .git/config (submodule.$name.url)\n> \n> 2. 'git-submodule update' keeps the work tree updated for submodules\n> with five separate (and optional) operations:\n>   a) git-clone --bare $url .git/submodules/$name.git\n>   b) git-clone -l -s .git/submodules/$name.git $path\n>   c) cd .git/submodules/$name.git && git-fetch\n>   d) cd $path && git-fetch\n>   e) cd $path && git-checkout $sha1\n> \n> 3) 'git-submodule push' runs something like 'cd $path && git push\n> origin $branch', where $branch is found in .gitmodules\n> (path.$path.branch).\n\nSo if you need superproject related corrections in the submodule,\nyou always have to do it on branch \"path.$path.branch\" in the\nsubmodule to get it saved?\n\nI would assume that pushing the current branch should be enough.\nIf you want to play with multiple different \"corrections\" on\ndifferent branches in the submodule, you do not want to force\nthe branch name to a unique one given in .gitmodules.\n\nJosef\n"},{"id":"43730","messageId":"20070601085705.GT955MdfPADPa@greensroom.kotnet.org","threadId":"8343","inReplyTo":"8c5c35580705301717h4e9b127fr21ee19764f8ec288@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-01T08:57:05Z","receivedAt":"2007-06-01T08:57:05Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Thu, May 31, 2007 at 02:17:30AM +0200, Lars Hjemli wrote:\n> 1. 'git-submodule init' saves submodule name and suggested url from\n> .gitmodules into .git/config (submodule.$name.url)\n\nCould you please document the proposed .gitmodules first?\nSince it looks like I'm going to be forced to my submodule URLs there,\nI need to know how to do it before I can start using submodules properly.\n\nskimo\n"},{"id":"43732","messageId":"8c5c35580706010217q3eb9384fx2f6d5edd6e92a6e@mail.gmail.com","threadId":"8343","inReplyTo":"200706011008.38063.Josef.Weidendorfer@gmx.de","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-01T09:17:01Z","receivedAt":"2007-06-01T09:17:01Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/1/07, Josef Weidendorfer <Josef.Weidendorfer@gmx.de> wrote:\n> > On 5/28/07, Lars Hjemli <hjemli@gmail.com> wrote:\n> > 3) 'git-submodule push' runs something like 'cd $path && git push\n> > origin $branch', where $branch is found in .gitmodules\n> > (path.$path.branch).\n>\n> So if you need superproject related corrections in the submodule,\n> you always have to do it on branch \"path.$path.branch\" in the\n> submodule to get it saved?\n>\n> I would assume that pushing the current branch should be enough.\n> If you want to play with multiple different \"corrections\" on\n> different branches in the submodule, you do not want to force\n> the branch name to a unique one given in .gitmodules.\n>\n\nThe current (and planned) implementation of git-submodule detaches\nHEAD in the submodules, so there will not be a current branch unless\nthe user has done 'cd $path && git-checkout somebranch'.\n\nWe might take advantage of that fact:\n  * try to exec 'git-symbolic-ref HEAD'\n  * if it fails, push to path.$path.branch\n  * otherwise, push to the ref pointed to by HEAD\n\nBut this will still loose any changes on _other_ branches (that has\nnot been pushed to origin manually). I'm not sure if/how we can avoid\nthis, except by making $path be a symlink to .git/submodules/$name.git\n(which has other issues...)\n\n--\nlarsh\n"},{"id":"43734","messageId":"8c5c35580706010225p7c34c3ceu8bbfb9996388d673@mail.gmail.com","threadId":"8343","inReplyTo":"20070601085705.GT955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-01T09:25:42Z","receivedAt":"2007-06-01T09:25:42Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/1/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Thu, May 31, 2007 at 02:17:30AM +0200, Lars Hjemli wrote:\n> > 1. 'git-submodule init' saves submodule name and suggested url from\n> > .gitmodules into .git/config (submodule.$name.url)\n>\n> Could you please document the proposed .gitmodules first?\n\nThe man-page for git-submodule found in 'next' mentions how it uses\n.gitmodules, but there isn't (yet) a separate man-page for\n.gitmodules(5).\n\nBut: when I implement the proposed plan, it will change the current\nlayout of .gitmodules from\n\n[module '$path']\n  url=/some/url\n\nto\n\n[path '$path']\n  submodule=modulename\n  url=/some/url\n\nIs it ok if gitmodules(5) appears as part of the planned patch-series?\n\n--\nlarsh\n"},{"id":"43735","messageId":"20070601093554.GV955MdfPADPa@greensroom.kotnet.org","threadId":"8343","inReplyTo":"8c5c35580706010225p7c34c3ceu8bbfb9996388d673@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-01T09:35:54Z","receivedAt":"2007-06-01T09:35:54Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Fri, Jun 01, 2007 at 11:25:42AM +0200, Lars Hjemli wrote:\n> On 6/1/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> >Could you please document the proposed .gitmodules first?\n> \n> The man-page for git-submodule found in 'next' mentions how it uses\n> .gitmodules, but there isn't (yet) a separate man-page for\n> .gitmodules(5).\n\nThat's what I'd like to see first.\n.gitmodules(5) will hopefully not change in an incompatible\nway after it is accepted, while there is no such constraint\nfor git-submodule.\n\n> [path '$path']\n>  submodule=modulename\n>  url=/some/url\n\nWouldn't it make more sense to have\n\n[path '$path']\n\tsubmodule=modulename\n\nand\n\n[submodule '$modulename']\n\turl=/some/url\n\nin case the same module appears in more than one path?\n\n> Is it ok if gitmodules(5) appears as part of the planned patch-series?\n\nFor me it is.\n\nskimo\n"},{"id":"43742","messageId":"8c5c35580706010745l76fc5410l21f2e3f385693ad9@mail.gmail.com","threadId":"8343","inReplyTo":"20070601093554.GV955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-01T14:45:06Z","receivedAt":"2007-06-01T14:45:06Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/1/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Fri, Jun 01, 2007 at 11:25:42AM +0200, Lars Hjemli wrote:\n> > On 6/1/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> > >Could you please document the proposed .gitmodules first?\n> >\n> > The man-page for git-submodule found in 'next' mentions how it uses\n> > .gitmodules, but there isn't (yet) a separate man-page for\n> > .gitmodules(5).\n>\n> That's what I'd like to see first.\n> .gitmodules(5) will hopefully not change in an incompatible\n> way after it is accepted, while there is no such constraint\n> for git-submodule.\n\nTrue\n\n>\n> > [path '$path']\n> >  submodule=modulename\n> >  url=/some/url\n>\n> Wouldn't it make more sense to have\n>\n> [path '$path']\n>         submodule=modulename\n>\n> and\n>\n> [submodule '$modulename']\n>         url=/some/url\n>\n> in case the same module appears in more than one path?\n\nYes, that would be a properly normalized model.\n\nHmm.... Maybe we could allow both variations, with your suggestion\noverriding mine if both are present? (I think there would be many\ncases where the extra level of [submodule...] wouldn't be needed.\nAlso, the url in .gitmodules will only function as the initially\nsuggested url stored in the 'superprojects' .git/config)\n\n--\nlarsh\n"},{"id":"43743","messageId":"20070601145104.GY955MdfPADPa@greensroom.kotnet.org","threadId":"8343","inReplyTo":"8c5c35580706010745l76fc5410l21f2e3f385693ad9@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-01T14:51:04Z","receivedAt":"2007-06-01T14:51:04Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Fri, Jun 01, 2007 at 04:45:06PM +0200, Lars Hjemli wrote:\n> On 6/1/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> >On Fri, Jun 01, 2007 at 11:25:42AM +0200, Lars Hjemli wrote:\n> >> [path '$path']\n> >>  submodule=modulename\n> >>  url=/some/url\n> >\n> >Wouldn't it make more sense to have\n> >\n> >[path '$path']\n> >        submodule=modulename\n> >\n> >and\n> >\n> >[submodule '$modulename']\n> >        url=/some/url\n> >\n> >in case the same module appears in more than one path?\n> \n> Yes, that would be a properly normalized model.\n> \n> Hmm.... Maybe we could allow both variations, with your suggestion\n> overriding mine if both are present? (I think there would be many\n> cases where the extra level of [submodule...] wouldn't be needed.\n\nHmm.... I was thinking that the extra \"path\" level could be optional,\ni.e., if there is no path.$path.submodule, then the name of the\nsubmodule would simply be $path.\n\nskimo\n"},{"id":"43744","messageId":"8c5c35580706010856s390b1157p3ea0d28cb2074cae@mail.gmail.com","threadId":"8343","inReplyTo":"20070601145104.GY955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-01T15:56:34Z","receivedAt":"2007-06-01T15:56:34Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/1/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Fri, Jun 01, 2007 at 04:45:06PM +0200, Lars Hjemli wrote:\n> > On 6/1/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> > >On Fri, Jun 01, 2007 at 11:25:42AM +0200, Lars Hjemli wrote:\n> > >> [path '$path']\n> > >>  submodule=modulename\n> > >>  url=/some/url\n> > >\n> > >Wouldn't it make more sense to have\n> > >\n> > >[path '$path']\n> > >        submodule=modulename\n> > >\n> > >and\n> > >\n> > >[submodule '$modulename']\n> > >        url=/some/url\n> > >\n> > >in case the same module appears in more than one path?\n> >\n> > Yes, that would be a properly normalized model.\n> >\n> > Hmm.... Maybe we could allow both variations, with your suggestion\n> > overriding mine if both are present? (I think there would be many\n> > cases where the extra level of [submodule...] wouldn't be needed.\n>\n> Hmm.... I was thinking that the extra \"path\" level could be optional,\n> i.e., if there is no path.$path.submodule, then the name of the\n> submodule would simply be $path.\n\nYeah, that should also work out. Time for a quick poll?\n\n-- \nlarsh\n"},{"id":"43746","messageId":"alpine.LFD.0.98.0706010919360.3957@woody.linux-foundation.org","threadId":"8343","inReplyTo":"8c5c35580706010856s390b1157p3ea0d28cb2074cae@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-06-01T16:29:58Z","receivedAt":"2007-06-01T16:29:58Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Jun 2007, Lars Hjemli wrote:\n\n> On 6/1/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> > \n> > Hmm.... I was thinking that the extra \"path\" level could be optional,\n> > i.e., if there is no path.$path.submodule, then the name of the\n> > submodule would simply be $path.\n> \n> Yeah, that should also work out. Time for a quick poll?\n\nAck. I think the natural thing for a lot of cases is the trivial \"module \nname == path\" case, so having to have\n\n\t[path \"kernel\"]\n\t\tmodule = kernel\n\nfor that case just sounds unnecessary.\n\nThat said, I wonder if it wouldn't be more natural to do things the other \nway around, because quite often a \"module\" (under CVS conventions) is a \n*set* of directories, so with that in mind, it might be better to have the \nmapping be something like this:\n\n\t[module \"infrastructure\"]\n\t\tsubmodule = lib\n\t\tsubmodule = build\n\n\t[submodule \"lib\"]\n\t\turl = git://xyzzy/lib-1.2.3\n\n\t[submodule \"build\"]\n\t\turl = git://xyzzy/build-0.61\n\n\nand make the rule be:\n - submodules are named by their paths (ie \"path == submodule\")\n - a module is a set of such submodules/paths\n - if no \"module\" is defined, the default is to just use the \n   path/submodule name\n\nIOW, in the above case, we have *three* modules:\n\n - module \"infrastructure\", that is the union of submodules/paths \"lib\" \n   and \"build\"\n - module \"lib\" (== submodule/path \"lib\")\n - module \"build\" (== submodule/path \"build\")\n\nand when you do a \n\n\tgit submodule checkout infrastructure\n\nit would be basically equivalent to\n\n\tgit submodule checkout lib\n\tgit submodule checkout build\n\nHmm? That's how CVS users use modules (ie the \"src\" module may be much \nmore than a single subdirectory)\n\n\t\tLinus\n"},{"id":"43754","messageId":"7vfy5bzby1.fsf@assigned-by-dhcp.cox.net","threadId":"8343","inReplyTo":"alpine.LFD.0.98.0706010919360.3957@woody.linux-foundation.org","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-06-01T19:55:50Z","receivedAt":"2007-06-01T19:55:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Fri, 1 Jun 2007, Lars Hjemli wrote:\n> ...\n> Ack. I think the natural thing for a lot of cases is the trivial \"module \n> name == path\" case, so having to have\n>\n> \t[path \"kernel\"]\n> \t\tmodule = kernel\n>\n> for that case just sounds unnecessary.\n>\n> That said, I wonder if it wouldn't be more natural to do things the other \n> way around, because quite often a \"module\" (under CVS conventions) is a \n> *set* of directories, so with that in mind, it might be better to have the \n> mapping be something like this:\n>\n> \t[module \"infrastructure\"]\n> \t\tsubmodule = lib\n> \t\tsubmodule = build\n>\n> \t[submodule \"lib\"]\n> \t\turl = git://xyzzy/lib-1.2.3\n>\n> \t[submodule \"build\"]\n> \t\turl = git://xyzzy/build-0.61\n>\n> and make the rule be:\n>  - submodules are named by their paths (ie \"path == submodule\")\n>  - a module is a set of such submodules/paths\n>  - if no \"module\" is defined, the default is to just use the \n>    path/submodule name\n\nI take that if you do want to name a submodule differently from\nits (currently in-tree) path, you would do something like...\n\n\t[submodule \"xyzzylib\"]\n        \tpath = lib\n                url = git://xyzzy/lib-1.2.3\n\n> IOW, in the above case, we have *three* modules:\n>\n>  - module \"infrastructure\", that is the union of submodules/paths \"lib\" \n>    and \"build\"\n>  - module \"lib\" (== submodule/path \"lib\")\n>  - module \"build\" (== submodule/path \"build\")\n>\n> and when you do a \n>\n> \tgit submodule checkout infrastructure\n>\n> it would be basically equivalent to\n>\n> \tgit submodule checkout lib\n> \tgit submodule checkout build\n\nSounds very sensible.\n"},{"id":"43787","messageId":"8c5c35580706020013g2a4039fcsdf8974da8cd4c2c2@mail.gmail.com","threadId":"8343","inReplyTo":"7vfy5bzby1.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-02T07:13:55Z","receivedAt":"2007-06-02T07:13:55Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/1/07, Junio C Hamano <junkio@cox.net> wrote:\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n>\n> > On Fri, 1 Jun 2007, Lars Hjemli wrote:\n> > ...\n> > Ack. I think the natural thing for a lot of cases is the trivial \"module\n> > name == path\" case, so having to have\n> >\n> >       [path \"kernel\"]\n> >               module = kernel\n> >\n> > for that case just sounds unnecessary.\n> >\n> > That said, I wonder if it wouldn't be more natural to do things the other\n> > way around, because quite often a \"module\" (under CVS conventions) is a\n> > *set* of directories, so with that in mind, it might be better to have the\n> > mapping be something like this:\n> >\n> >       [module \"infrastructure\"]\n> >               submodule = lib\n> >               submodule = build\n> >\n> >       [submodule \"lib\"]\n> >               url = git://xyzzy/lib-1.2.3\n> >\n> >       [submodule \"build\"]\n> >               url = git://xyzzy/build-0.61\n> >\n> > and make the rule be:\n> >  - submodules are named by their paths (ie \"path == submodule\")\n> >  - a module is a set of such submodules/paths\n> >  - if no \"module\" is defined, the default is to just use the\n> >    path/submodule name\n>\n> I take that if you do want to name a submodule differently from\n> its (currently in-tree) path, you would do something like...\n>\n>         [submodule \"xyzzylib\"]\n>                 path = lib\n>                 url = git://xyzzy/lib-1.2.3\n>\n\nThe reason I wanted to use\n\n[path \"lib\"]\n  submodule=xyzzylib\n  url=git://xyzzy/lib-1.2.3\n\nis that the git-submodule command always starts out with the submodule\npath, trying to map that to an url or a submodule name. My proposal\nallows\n\n  $ name=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".submodule)\n  $ url=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".url)\n\n\nThen Sven suggested to create a submodule section for the url, which would allow\n\n  $ name=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".submodule)\n  $ url=$(GIT_CONFIG=.gitmodules git-config submodule.\"$name\".url)\n\n\nBut I don't see an easy way to do the mapping from path to url/submodule with:\n\n[submodule \"xyzzylib\"]\n  path=lib\n  url=git://xyzzy/lib-1.2.3\n\nSuggestions?\n\n--\nlarsh\n"},{"id":"43788","messageId":"20070602074410.GA955MdfPADPa@greensroom.kotnet.org","threadId":"8343","inReplyTo":"8c5c35580706020013g2a4039fcsdf8974da8cd4c2c2@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-02T07:44:10Z","receivedAt":"2007-06-02T07:44:10Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sat, Jun 02, 2007 at 09:13:55AM +0200, Lars Hjemli wrote:\n> Then Sven suggested to create a submodule section for the url, which would \n> allow\n> \n>  $ name=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".submodule)\n>  $ url=$(GIT_CONFIG=.gitmodules git-config submodule.\"$name\".url)\n> \n> \n> But I don't see an easy way to do the mapping from path to url/submodule \n> with:\n> \n> [submodule \"xyzzylib\"]\n>  path=lib\n>  url=git://xyzzy/lib-1.2.3\n> \n> Suggestions?\n\nI'm not a shell programmer, but it could look something like this\n\n    $ name=$(git config --get-regexp 'submodule\\..*\\.path' | while read module modulepath; do if test \"$modulepath\" = \"$path\"; then echo $module | sed -e 's/^submodule.//' -e 's/.path//'; fi; done)\n\nskimo\n"},{"id":"43789","messageId":"20070602074910.GB955MdfPADPa@greensroom.kotnet.org","threadId":"8343","inReplyTo":"alpine.LFD.0.98.0706010919360.3957@woody.linux-foundation.org","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-02T07:49:10Z","receivedAt":"2007-06-02T07:49:10Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Fri, Jun 01, 2007 at 09:29:58AM -0700, Linus Torvalds wrote:\n> \t[module \"infrastructure\"]\n> \t\tsubmodule = lib\n> \t\tsubmodule = build\n> \n> \t[submodule \"lib\"]\n> \t\turl = git://xyzzy/lib-1.2.3\n> \n> \t[submodule \"build\"]\n> \t\turl = git://xyzzy/build-0.61\n> \n> \n> IOW, in the above case, we have *three* modules:\n> \n>  - module \"infrastructure\", that is the union of submodules/paths \"lib\" \n>    and \"build\"\n>  - module \"lib\" (== submodule/path \"lib\")\n>  - module \"build\" (== submodule/path \"build\")\n\nIf there are three modules, then why is one in the \"module\" section\nand the other two in the \"submodule\" section?\nWhy not allow a module to both contain smaller modules and be contained\nin a bigger module?\n\nskimo\n"},{"id":"43790","messageId":"8c5c35580706020139k3beae8bbj3f51eee0ff5fd30c@mail.gmail.com","threadId":"8343","inReplyTo":"20070602074410.GA955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-02T08:39:41Z","receivedAt":"2007-06-02T08:39:41Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/2/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Sat, Jun 02, 2007 at 09:13:55AM +0200, Lars Hjemli wrote:\n> > Then Sven suggested to create a submodule section for the url, which would\n> > allow\n> >\n> >  $ name=$(GIT_CONFIG=.gitmodules git-config path.\"$path\".submodule)\n> >  $ url=$(GIT_CONFIG=.gitmodules git-config submodule.\"$name\".url)\n> >\n> >\n> > But I don't see an easy way to do the mapping from path to url/submodule\n> > with:\n> >\n> > [submodule \"xyzzylib\"]\n> >  path=lib\n> >  url=git://xyzzy/lib-1.2.3\n> >\n> > Suggestions?\n>\n> I'm not a shell programmer,\n\nMe neither ;-)\n\n>but it could look something like this\n>\n>     $ name=$(git config --get-regexp 'submodule\\..*\\.path' | while read module modulepath; do if test \"$modulepath\" = \"$path\"; then echo $module | sed -e 's/^submodule.//' -e 's/.path//'; fi; done)\n>\n\nAhh, --get-regexp, thanks.\n\nThen this actually works:\n\nname=$(GIT_CONFIG=.gitmodules git-config --get-regexp\n'submodule\\..*\\.path' 'lib' | sed -e 's/^submodule\\.\\(.*\\)\\.path\nlib$/\\1/')\n\n\nBut why would we want to design .gitmodules in a way that makes it\nhard to do the mapping from path to url?\n\n-- \nlarsh\n"},{"id":"43792","messageId":"7vejkuyaxq.fsf@assigned-by-dhcp.cox.net","threadId":"8343","inReplyTo":"8c5c35580706020139k3beae8bbj3f51eee0ff5fd30c@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-06-02T09:15:13Z","receivedAt":"2007-06-02T09:15:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Lars Hjemli\" <hjemli@gmail.com> writes:\n\n> But why would we want to design .gitmodules in a way that makes it\n> hard to do the mapping from path to url?\n\nPerhaps because \"path\" is not the \"identity\" of the subproject, but\nthe (logical) subproject name is?\n"},{"id":"43794","messageId":"8c5c35580706020253j4e24785cyce712460d8d1a1b8@mail.gmail.com","threadId":"8343","inReplyTo":"7vejkuyaxq.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-02T09:53:19Z","receivedAt":"2007-06-02T09:53:19Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/2/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"Lars Hjemli\" <hjemli@gmail.com> writes:\n>\n> > But why would we want to design .gitmodules in a way that makes it\n> > hard to do the mapping from path to url?\n>\n> Perhaps because \"path\" is not the \"identity\" of the subproject, but\n> the (logical) subproject name is?\n>\n>\n\nOk.\n\nSo I'll make 'git-submodule' expect the .gitmodules layout to be like this:\n\n[submodule 'xyz']\n  url=git://example.com/xyz.git\n  path=xyz1\n  path=xyz2\n\nAnd submodule.$name.path should be optional: if no submodule.*.path\nentry exists for a given $path, submodule $name == $path.\n\nOk?\n\n--\nlarsh\n"},{"id":"43796","messageId":"7vbqfyvf5o.fsf@assigned-by-dhcp.cox.net","threadId":"8343","inReplyTo":"8c5c35580706020253j4e24785cyce712460d8d1a1b8@mail.gmail.com","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-06-02T10:12:19Z","receivedAt":"2007-06-02T10:12:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Lars Hjemli\" <hjemli@gmail.com> writes:\n\n> So I'll make 'git-submodule' expect the .gitmodules layout to be like this:\n>\n> [submodule 'xyz']\n>  url=git://example.com/xyz.git\n>  path=xyz1\n>  path=xyz2\n>\n> And submodule.$name.path should be optional: if no submodule.*.path\n> entry exists for a given $path, submodule $name == $path.\n>\n> Ok?\n\nI do not think having more than one path for a given submodule\nmakes much sense, but other than that yes.\n"},{"id":"43797","messageId":"8c5c35580706020338v89d341cg811982891a439685@mail.gmail.com","threadId":"8343","inReplyTo":"7vbqfyvf5o.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-02T10:38:50Z","receivedAt":"2007-06-02T10:38:50Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/2/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"Lars Hjemli\" <hjemli@gmail.com> writes:\n>\n> > So I'll make 'git-submodule' expect the .gitmodules layout to be like this:\n> >\n> > [submodule 'xyz']\n> >  url=git://example.com/xyz.git\n> >  path=xyz1\n> >  path=xyz2\n> >\n> > And submodule.$name.path should be optional: if no submodule.*.path\n> > entry exists for a given $path, submodule $name == $path.\n> >\n> > Ok?\n>\n> I do not think having more than one path for a given submodule\n> makes much sense\n\nMe neither, but it was mentioned as a possibility to have the same\nrepo checked out in multiple paths simultaneously. It does raise an\nissue of how to push changes back into .git/submodules/$name.git tough\n(git-submodule push). My initial plan for this was to push into the\nbranch registered for each path:\n\n[submodule 'xyz']\n  url=git://example.com/xyz.git\n\n[path 'xyz1']\n  submodule=xyz\n  branch=stable\n\n[path 'xyz2']\n  submodule=xyz\n  branch=bleedingedge\n\nbut there is probably other/better solutions.\n\n>but other than that yes.\n\nThanks\n\n-- \nlarsh\n"},{"id":"43810","messageId":"alpine.LFD.0.98.0706020923170.23741@woody.linux-foundation.org","threadId":"8343","inReplyTo":"20070602074910.GB955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-06-02T16:34:26Z","receivedAt":"2007-06-02T16:34:26Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 2 Jun 2007, Sven Verdoolaege wrote:\n\n> On Fri, Jun 01, 2007 at 09:29:58AM -0700, Linus Torvalds wrote:\n> > \t[module \"infrastructure\"]\n> > \t\tsubmodule = lib\n> > \t\tsubmodule = build\n> > \n> > \t[submodule \"lib\"]\n> > \t\turl = git://xyzzy/lib-1.2.3\n> > \n> > \t[submodule \"build\"]\n> > \t\turl = git://xyzzy/build-0.61\n> > \n> > \n> > IOW, in the above case, we have *three* modules:\n> > \n> >  - module \"infrastructure\", that is the union of submodules/paths \"lib\" \n> >    and \"build\"\n> >  - module \"lib\" (== submodule/path \"lib\")\n> >  - module \"build\" (== submodule/path \"build\")\n> \n> If there are three modules, then why is one in the \"module\" section\n> and the other two in the \"submodule\" section?\n\nBecause there are:\n\n - *two* actual submodules (== path), namely \"lib\" and \"build\".\n\n - each submodule always is *implicitly* a module too\n\n - we have a *named* (aka explicit) module \"infrastructure\" that is a \n   higher-level name for one or more submodules (in this case two).\n\nSo the implicit modules could have been written out:\n\n\t[module \"lib\"]\n\t\tsubmodule = \"lib\" \t# aka 'path = \"lib\"'\n\n\t [module \"build\"]\n\t\tsubmodule = \"build\"\t# aka 'path = \"build\"'\n\nbut my suggestion was that if the module name and the path name are the \nsame, you don't need to say it.\n\n(And quite frankly, I think it reads better as \"submodule\" than as \"path\", \nbut maybe that threw you).\n\n> Why not allow a module to both contain smaller modules and be contained\n> in a bigger module?\n\nBecause the \"module\" definition is _different_ from the \"submodule\" \ndefinition.\n\nThe \"module\" definition is just a level of indirection. It is what allows \nyou to call your module \"kernel\" regardless of where in the tree it is \n(and regardless of whether it's actually built up on *one* directory or \nmany). It allows what CVS users have long used the \"alias\" thing for (or \nwhatever it's called in CVSROOT/modules. But it also allows you to name \nsingle modules *without* having to specify exactly where in the tree they \nare.\n\nIn contrast, the \"submodule\" thing actually would declare where the \nsubmodule can be found from an URL standpoint. \n\nAnd maybe you want to allow the CVS \"alias\" kind of thing separately, but \nI think it's very common (exactly because quite often you want to cluster \na few submodules together as \"src\" or \"docs\" or something, even if they \nmight be technically more than one actual subproject).\n\n\t\tLinus\n"},{"id":"43814","messageId":"20070602173551.GC955MdfPADPa@greensroom.kotnet.org","threadId":"8343","inReplyTo":"alpine.LFD.0.98.0706020923170.23741@woody.linux-foundation.org","subject":"Re: [PATCH] Let .git/config specify the url for submodules","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-02T17:35:51Z","receivedAt":"2007-06-02T17:35:51Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sat, Jun 02, 2007 at 09:34:26AM -0700, Linus Torvalds wrote:\n> On Sat, 2 Jun 2007, Sven Verdoolaege wrote:\n> > On Fri, Jun 01, 2007 at 09:29:58AM -0700, Linus Torvalds wrote:\n> > > \t[module \"infrastructure\"]\n> > > \t\tsubmodule = lib\n> > > \t\tsubmodule = build\n> > > \n> > > \t[submodule \"lib\"]\n> > > \t\turl = git://xyzzy/lib-1.2.3\n> > > \n> > > \t[submodule \"build\"]\n> > > \t\turl = git://xyzzy/build-0.61\n> > > \n> > > \n> > > IOW, in the above case, we have *three* modules:\n> > > \n> > >  - module \"infrastructure\", that is the union of submodules/paths \"lib\" \n> > >    and \"build\"\n> > >  - module \"lib\" (== submodule/path \"lib\")\n> > >  - module \"build\" (== submodule/path \"build\")\n> > \n> > If there are three modules, then why is one in the \"module\" section\n> > and the other two in the \"submodule\" section?\n> \n> Because there are:\n> \n>  - *two* actual submodules (== path), namely \"lib\" and \"build\".\n> \n>  - each submodule always is *implicitly* a module too\n> \n>  - we have a *named* (aka explicit) module \"infrastructure\" that is a \n>    higher-level name for one or more submodules (in this case two).\n> \n> So the implicit modules could have been written out:\n> \n> \t[module \"lib\"]\n> \t\tsubmodule = \"lib\" \t# aka 'path = \"lib\"'\n> \n> \t [module \"build\"]\n> \t\tsubmodule = \"build\"\t# aka 'path = \"build\"'\n> \n> but my suggestion was that if the module name and the path name are the \n> same, you don't need to say it.\n> \n> (And quite frankly, I think it reads better as \"submodule\" than as \"path\", \n> but maybe that threw you).\n\nI did indeed glance over the \"submodule == path\" in your mail (and it\nseems Junio did so too).\nI thought it was more or less agreed that the URL should be associated\nto the logical module rather than the path (which you call \"submodule\"\nhere).  See http://article.gmane.org/gmane.comp.version-control.git/47567 .\n\nPersonally, I find your section names confusing.\nBoth your \"submodule\"s and \"module\"s are submodules from the point\nof view of the project containing the .gitmodules.\nAnd anything in the \"submodule\" section is only a (proper) submodule\nof some other module if there happens to be a \"module\" containing it.\n\nWhat's wrong with the following?\n\n\t[module \"infrastructure\"]\n\t\tsubmodule = lib\n\t\tsubmodule = build\n\n\t[module \"lib\"]\n\t\turl = git://xyzzy/lib-1.2.3\n\n\t[module \"build\"]\n\t\turl = git://xyzzy/build-0.61\n\nA module with a \"url\" attribute can be cloned from that url.\nA module with one or more \"submodule\" attributes requires\nthese modules as well.\n\n> > Why not allow a module to both contain smaller modules and be contained\n> > in a bigger module?\n> \n> Because the \"module\" definition is _different_ from the \"submodule\" \n> definition.\n\n>From the point of view of the user, they are the same.\nThey can both be used as an argument to\n\n\tgit submodule checkout\n\n> The \"module\" definition is just a level of indirection.\n\nBut why limit yourself to _one_ level of indirection?\nIf you call everything a \"module\" (or everything a \"submodule\")\nthen you get multiple levels of indirection for free.\n\nskimo\n"},{"id":"48547","messageId":"20070725081508.GN1591MdfPADPa@greensroom.kotnet.org","threadId":"8343","inReplyTo":"20070602074410.GA955MdfPADPa@greensroom.kotnet.org","subject":"Re: submodule init problem","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-07-25T08:15:08Z","receivedAt":"2007-07-25T08:15:08Z","isPatch":false,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Tue, Jul 24, 2007 at 06:49:26PM -0700, Junio C Hamano wrote:\n> Ok, this appears it most likely to be related to the fact that\n> one is a prefix of the other in problematic case.\n\nYes, this has been noted before and Chris Larson sent in a patch,\nbut he didn't follow up on it.\n\nOn Fri, Jul 20, 2007 at 07:36:43PM +0100, Johannes Schindelin wrote:\n> Hi,\n> \n> On Fri, 20 Jul 2007, Junio C Hamano wrote:\n> \n> > \"Chris Larson\" <clarson@kergoth.com> writes:\n> > \n> > > +       name=$(GIT_CONFIG=.gitmodules git config --get-regexp\n> > > '^submodule\\..*\\.path$' \"^$path$\" |\n> > >        sed -nre 's/^submodule\\.(.+)\\.path .+$/\\1/p')\n> \n> I wonder why it is a regular expression to begin with, since we seem to \n> prefer shell patterns on paths.\n> \n> However, _if_ we already go with regexps, why not just put it into the \n> \"sed\" call, which is _already_ there, and leave \"git config\" alone?  IOW \n> call\n> \n> \tgit config --get-regexp '^submodule\\..*\\.path$' |\n> \t\tsed -nre 's/^submodule\\.(.*$path.*)\\.path .+$\\1/p'\n>\n\nYou would be matching the key (the name of the module) rather than\nthe value (the path of the module) here.\n\nAnyway, I'm not sure why Lars went for the regexp.\nI thought he wanted to match the path exactly, which\nis why I originally proposed (the more clunky)\n\nOn Sat, Jun 02, 2007 at 09:44:10AM +0200, Sven Verdoolaege wrote:\n> On Sat, Jun 02, 2007 at 09:13:55AM +0200, Lars Hjemli wrote:\n> > But I don't see an easy way to do the mapping from path to url/submodule \n> > with:\n> > \n> > [submodule \"xyzzylib\"]\n> >  path=lib\n> >  url=git://xyzzy/lib-1.2.3\n> > \n> > Suggestions?\n> \n> I'm not a shell programmer, but it could look something like this\n> \n>     $ name=$(git config --get-regexp 'submodule\\..*\\.path' | while read module modulepath; do if test \"$modulepath\" = \"$path\"; then echo $module | sed -e 's/^submodule.//' -e 's/.path//'; fi; done)\n\nskimo\n"},{"id":"48586","messageId":"8c5c35580707251325i2633777pdd7604b541506533@mail.gmail.com","threadId":"8343","inReplyTo":"20070725081508.GN1591MdfPADPa@greensroom.kotnet.org","subject":"Re: submodule init problem","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-07-25T20:25:28Z","receivedAt":"2007-07-25T20:25:28Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 7/25/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Tue, Jul 24, 2007 at 06:49:26PM -0700, Junio C Hamano wrote:\n> > Ok, this appears it most likely to be related to the fact that\n> > one is a prefix of the other in problematic case.\n>\n> Yes, this has been noted before and Chris Larson sent in a patch,\n> but he didn't follow up on it.\n\nThe following seems to work (in my limitied testing):\n\n  eol='$'\n  git config --get-regexp '^submodule\\..*\\.path$' \"^$1$eol\"\n\n--\nlarsh\n"},{"id":"48587","messageId":"Pine.LNX.4.64.0707252129150.14781@racer.site","threadId":"8343","inReplyTo":"8c5c35580707251325i2633777pdd7604b541506533@mail.gmail.com","subject":"Re: submodule init problem","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-25T20:31:04Z","receivedAt":"2007-07-25T20:31:04Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 25 Jul 2007, Lars Hjemli wrote:\n\n> On 7/25/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> > On Tue, Jul 24, 2007 at 06:49:26PM -0700, Junio C Hamano wrote:\n> > > Ok, this appears it most likely to be related to the fact that\n> > > one is a prefix of the other in problematic case.\n> > \n> > Yes, this has been noted before and Chris Larson sent in a patch,\n> > but he didn't follow up on it.\n> \n> The following seems to work (in my limitied testing):\n> \n>  eol='$'\n>  git config --get-regexp '^submodule\\..*\\.path$' \"^$1$eol\"\n\nAh, now I get it.  You are looking for the _key_ whose value is \"$1\".  But \nthen you really should use \"^$1$\", and not just \"$1\", otherwise you will \nget unintended behaviour when one submodule's name is a substring of \nanother submodule's name.\n\nAnd you do not need the eol hack.\n\nCiao,\nDscho\n"},{"id":"48588","messageId":"8c5c35580707251340n2f1a9fd2j5fdf322277d68d26@mail.gmail.com","threadId":"8343","inReplyTo":"Pine.LNX.4.64.0707252129150.14781@racer.site","subject":"Re: submodule init problem","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-07-25T20:40:47Z","receivedAt":"2007-07-25T20:40:47Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 7/25/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> On Wed, 25 Jul 2007, Lars Hjemli wrote:\n> >  eol='$'\n> >  git config --get-regexp '^submodule\\..*\\.path$' \"^$1$eol\"\n>\n> Ah, now I get it.  You are looking for the _key_ whose value is \"$1\".\n\nYes\n\n> And you do not need the eol hack.\n\nHmm, I tried misc. quoting/escaping without success, care to educate me?\n\n-- \nlarsh\n"},{"id":"48591","messageId":"Pine.LNX.4.64.0707252150090.14781@racer.site","threadId":"8343","inReplyTo":"8c5c35580707251340n2f1a9fd2j5fdf322277d68d26@mail.gmail.com","subject":"Re: submodule init problem","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-25T20:50:32Z","receivedAt":"2007-07-25T20:50:32Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 25 Jul 2007, Lars Hjemli wrote:\n\n> On 7/25/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > On Wed, 25 Jul 2007, Lars Hjemli wrote:\n> > >  eol='$'\n> > >  git config --get-regexp '^submodule\\..*\\.path$' \"^$1$eol\"\n> > \n> > Ah, now I get it.  You are looking for the _key_ whose value is \"$1\".\n> \n> Yes\n> \n> > And you do not need the eol hack.\n> \n> Hmm, I tried misc. quoting/escaping without success, care to educate me?\n\nI already did ;-I  \"^$1$\"\n\nCiao,\nDscho\n"},{"id":"48597","messageId":"7v8x94dt2b.fsf@assigned-by-dhcp.cox.net","threadId":"8343","inReplyTo":"20070725081508.GN1591MdfPADPa@greensroom.kotnet.org","subject":"Re: submodule init problem","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-25T22:20:12Z","receivedAt":"2007-07-25T22:20:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sven Verdoolaege <skimo@kotnet.org> writes:\n\n> On Tue, Jul 24, 2007 at 06:49:26PM -0700, Junio C Hamano wrote:\n>> Ok, this appears it most likely to be related to the fact that\n>> one is a prefix of the other in problematic case.\n>\n> Yes, this has been noted before and Chris Larson sent in a patch,\n> but he didn't follow up on it.\n\nOk, I re-read the thread and came up with a different solution.\nHow does this look?\n\n-- >8 --\ngit-submodule module_name: avoid using unwieldy \"value_regexp\" feature.\n\n\"module_name $path\" function wants to look up a configuration\nvariable \"submodule.<modulename>.path\" whose value is $path, and\nreturn the <modulename> found.  \"git-config --get-regexp\" is the\nnatural thing to use for this, but (1) its value matching has an\nunfortunate \"feature\" that takes leading '!' specially, and (2)\nits output needs to be parsed with sed to extract <modulename>\npart anyway.\n\nThis changes the call to \"git-config --get-regexp\" not to use\nthe value-regexp part, and moves the \"pick the one whose value\nis $path\" part to the downstream sed.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n git-submodule.sh |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 1f0cb99..afbaec7 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -46,8 +46,11 @@ get_repo_base() {\n #\n module_name()\n {\n-       name=$(GIT_CONFIG=.gitmodules git config --get-regexp '^submodule\\..*\\.path$' \"$1\" |\n-       sed -nre 's/^submodule\\.(.+)\\.path .+$/\\1/p')\n+\t# Do we have \"submodule.<something>.path = $1\" defined in .gitmodules file?\n+\tre=$(printf '%s' \"$1\" | sed -e 's/\\([^a-zA-Z0-9_]\\)/\\\\\\1/g')\n+\tname=$( GIT_CONFIG=.gitmodules \\\n+\t\tgit config --get-regexp '^submodule\\..*\\.path$' |\n+\t\tsed -n -e 's|^submodule\\.\\(.*\\)\\.path '\"$re\"'$|\\1|p' )\n        test -z \"$name\" &&\n        die \"No submodule mapping found in .gitmodules for path '$path'\"\n        echo \"$name\"\n"},{"id":"48612","messageId":"d4b731510707251643m4c1b416qabf8a01205581c9d@mail.gmail.com","threadId":"8343","inReplyTo":"7v8x94dt2b.fsf@assigned-by-dhcp.cox.net","subject":"Re: submodule init problem","fromName":"Ricky Nite","fromEmail":"ricky.nite@gmail.com","sentAt":"2007-07-25T23:43:42Z","receivedAt":"2007-07-25T23:43:42Z","isPatch":false,"sender":{"key":"ricky.nite@gmail.com","avatar":"https://gravatar.com/avatar/e349dc8e620672d389697b5c8aee76a4fd31fb2d516677aaed6d01cac54cdabc?d=mp&s=160"},"body":"works for me :)\n\nbackgrounder:\nI'm currently importing a large cvs repo (multiple projects, shared\nmodules, shared environment) into cvs-tracking git \"superprojects\".\nIncremental import of the cvs modules using periodic invocations of\n\"git cvsimport\" seems to be working, although there were some messages\n(I suspect cvsps - will post later).  I was adding modules into the\nsuperprojects when I hit this submodule init issue.\n\nIt will also be nice to have some kind of \"superproject browser\" in gitk..\n\nOn 7/26/07, Junio C Hamano <gitster@pobox.com> wrote:\n> Sven Verdoolaege <skimo@kotnet.org> writes:\n>\n> > On Tue, Jul 24, 2007 at 06:49:26PM -0700, Junio C Hamano wrote:\n> >> Ok, this appears it most likely to be related to the fact that\n> >> one is a prefix of the other in problematic case.\n> >\n> > Yes, this has been noted before and Chris Larson sent in a patch,\n> > but he didn't follow up on it.\n>\n> Ok, I re-read the thread and came up with a different solution.\n> How does this look?\n>\n"},{"id":"48615","messageId":"7vzm1kavtd.fsf@assigned-by-dhcp.cox.net","threadId":"8343","inReplyTo":"d4b731510707251643m4c1b416qabf8a01205581c9d@mail.gmail.com","subject":"Re: submodule init problem","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-25T23:49:02Z","receivedAt":"2007-07-25T23:49:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Ricky Nite\" <ricky.nite@gmail.com> writes:\n\n> works for me :)\n\nThanks, will commit.\n"}]}