{"thread":{"id":"8535","subject":"[PATCH 2/3] Add gitmodules(5)","startedAt":"2007-06-09T21:38:49Z","lastAt":"2007-06-13T22:01:10Z","messageCount":29,"participants":["Lars Hjemli","Junio C Hamano","Frank Lichtenheld","Johannes Schindelin","Sven Verdoolaege","Matthias Lederhofer"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"44493","messageId":"1181425132239-git-send-email-hjemli@gmail.com","threadId":"8535","inReplyTo":null,"subject":"[PATCH 0/3] submodule improvements","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-09T21:38:49Z","receivedAt":"2007-06-09T21:38:49Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"This is a series of somewhat unrelated changes, but all related to\ngit-submodule.\n\n1/3 implements a mapping between submodule path and submodule name\n2/3 adds a gitmodules(5) document\n3/3 fixes a bug in testscript t7400, noticed when making 1/3\n\nThe stats:\n\nDocumentation/Makefile                             |    2 +-\nDocumentation/git-submodule.txt                    |   16 +++--\nDocumentation/gitmodules.txt                       |   63 ++++++++++++++++++++\ngit-submodule.sh                                   |   44 +++++++++----\nt/t7400-submodule-basic.sh                         |    2 +-\n...submodule-basic.sh => t7401-submodule-named.sh} |   27 ++++++---\n6 files changed, 124 insertions(+), 30 deletions(-)\n"},{"id":"44494","messageId":"1181425132294-git-send-email-hjemli@gmail.com","threadId":"8535","inReplyTo":"1181425132239-git-send-email-hjemli@gmail.com","subject":"[PATCH 1/3] git-submodule: allow submodule name and path to differ","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-09T21:38:50Z","receivedAt":"2007-06-09T21:38:50Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"This teaches git-submodule to check module.*.path when looking for the\nconfig for a submodule path. If no match is found it falls back to the\ncurrent behaviour (module.$path).\n\nWith this change a submodule can be checked out at different paths in\ndifferent revisions of the superproject without changing the submodule\nproperties in .git/config.\n\nWhile at it, add a new testscript for named submodules. This is basically\nthe same tests as can be found in t7400, but modified for a submodule\nwith name != path.\n\nSigned-off-by: Lars Hjemli <hjemli@gmail.com>\n---\n Documentation/git-submodule.txt                    |   16 ++++---\n git-submodule.sh                                   |   44 +++++++++++++------\n ...submodule-basic.sh => t7401-submodule-named.sh} |   27 ++++++++----\n 3 files changed, 59 insertions(+), 28 deletions(-)\n copy t/{t7400-submodule-basic.sh => t7401-submodule-named.sh} (82%)\n\ndiff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\nindex f8fb80f..176e16d 100644\n--- a/Documentation/git-submodule.txt\n+++ b/Documentation/git-submodule.txt\n@@ -24,8 +24,8 @@ status::\n \n init::\n \tInitialize the submodules, i.e. register in .git/config each submodule\n-\tpath and url found in .gitmodules. The key used in git/config is\n-\t`submodule.$path.url`. This command does not alter existing information\n+\tname and url found in .gitmodules. The key used in git/config is\n+\t`submodule.$name.url`. This command does not alter existing information\n \tin .git/config.\n \n update::\n@@ -50,11 +50,15 @@ OPTIONS\n \n FILES\n -----\n-When initializing 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+The .gitmodules file in the top-level directory of the containing repository\n+is used to map submodule path to submodule name. The map consist of keys\n+named `module.$name.path` with a value matching the path found in the index of\n+the containing repository. If no such key is found for a specific path, the\n+submodule path is used as submodule name.\n \n+During `git-submodule init` the url for each submodule is registered in\n+.git/config of the containing repository. The url is located under the key\n+`module.$name.url` in .gitmodules.\n \n AUTHOR\n ------\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 8bdd99a..d9f0c91 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -25,6 +25,18 @@ say()\n \tfi\n }\n \n+#\n+# Resolve submodule name from path, use path as name if no mapping exist\n+#\n+# $1 = path\n+#\n+module_name()\n+{\n+\tname=$(GIT_CONFIG=.gitmodules git-config --get-regexp '^module\\..*\\.path$' \"$1\" |\n+\t\tsed -nre 's/^module\\.(.+)\\.path .+$/\\1/p')\n+\ttest -z \"$name\" && name=\"$1\"\n+\techo $name\n+}\n \n #\n # Clone a submodule\n@@ -62,18 +74,19 @@ modules_init()\n \tgit ls-files --stage -- \"$@\" | grep -e '^160000 ' |\n \twhile read mode sha1 stage path\n \tdo\n-\t\t# Skip already registered paths\n-\t\turl=$(git-config submodule.\"$path\".url)\n+\t\t# Skip already registered submodules\n+\t\tname=$(module_name \"$path\")\n+\t\turl=$(git-config submodule.\"$name\".url)\n \t\ttest -z \"$url\" || continue\n \n-\t\turl=$(GIT_CONFIG=.gitmodules git-config module.\"$path\".url)\n+\t\turl=$(GIT_CONFIG=.gitmodules git-config module.\"$name\".url)\n \t\ttest -z \"$url\" &&\n-\t\tdie \"No url found for submodule '$path' in .gitmodules\"\n+\t\tdie \"No url found for submodule '$name', path '$path' in .gitmodules\"\n \n-\t\tgit-config submodule.\"$path\".url \"$url\" ||\n-\t\tdie \"Failed to register url for submodule '$path'\"\n+\t\tgit-config submodule.\"$name\".url \"$url\" ||\n+\t\tdie \"Failed to register url for submodule '$name', path '$path'\"\n \n-\t\tsay \"Submodule '$path' registered with url '$url'\"\n+\t\tsay \"Submodule '$name', path '$path' registered with url '$url'\"\n \tdone\n }\n \n@@ -87,13 +100,14 @@ modules_update()\n \tgit ls-files --stage -- \"$@\" | grep -e '^160000 ' |\n \twhile read mode sha1 stage path\n \tdo\n-\t\turl=$(git-config submodule.\"$path\".url)\n+\t\tname=$(module_name \"$path\")\n+\t\turl=$(git-config submodule.\"$name\".url)\n \t\tif test -z \"$url\"\n \t\tthen\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 '$name', path '$path' not initialized\"\n \t\t\tcontinue\n \t\tfi\n \n@@ -104,15 +118,15 @@ modules_update()\n \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 '$name', 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' in 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@@ -132,10 +146,12 @@ modules_list()\n \tgit ls-files --stage -- \"$@\" | grep -e '^160000 ' |\n \twhile read mode sha1 stage path\n \tdo\n-\t\tif ! test -d \"$path\"/.git\n+\t\tname=$(module_name \"$path\")\n+\t\turl=$(git-config submodule.\"$name\".url)\n+\t\tif test -z \"$url\" || ! test -d \"$path\"/.git\n \t\tthen\n \t\t\tsay \"-$sha1 $path\"\n-\t\t\tcontinue;\n+\t\t\tcontinue\n \t\tfi\n \t\trevname=$(unset GIT_DIR && cd \"$path\" && git-describe $sha1)\n \t\tif git diff-files --quiet -- \"$path\"\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7401-submodule-named.sh\nsimilarity index 82%\ncopy from t/t7400-submodule-basic.sh\ncopy to t/t7401-submodule-named.sh\nindex 3940433..3c3d195 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7401-submodule-named.sh\n@@ -3,10 +3,10 @@\n # Copyright (c) 2007 Lars Hjemli\n #\n \n-test_description='Basic porcelain support for submodules\n+test_description='Basic porcelain support for named submodules\n \n This test tries to verify basic sanity of the init, update and status\n-subcommands of git-submodule.\n+subcommands of git-submodule when a submodule name differs from its path.\n '\n \n . ./test-lib.sh\n@@ -18,7 +18,7 @@ subcommands of git-submodule.\n #  -add directory lib to 'superproject', this creates a DIRLINK entry\n #  -add a couple of regular files to enable testing of submodule filtering\n #  -mv lib subrepo\n-#  -add an entry to .gitmodules for path 'lib'\n+#  -add an entry to .gitmodules for submodule 'foo'\n #\n test_expect_success 'Prepare submodule testing' '\n \tmkdir lib &&\n@@ -40,7 +40,7 @@ test_expect_success 'Prepare submodule testing' '\n \tgit-add a lib z &&\n \tgit-commit -m \"super commit 1\" &&\n \tmv lib .subrepo &&\n-\tGIT_CONFIG=.gitmodules git-config module.lib.url git://example.com/lib.git\n+\tGIT_CONFIG=.gitmodules git-config module.foo.url git://example.com/libfoo.git\n '\n \n test_expect_success 'status should only print one line' '\n@@ -52,14 +52,25 @@ test_expect_success 'status should initially be \"missing\"' '\n \tgit-submodule status | grep \"^-$rev1\"\n '\n \n+test_expect_success 'init should fail when map from path to name is missing' '\n+\tif git-submodule init\n+\tthen\n+\t\techo \"[OOPS] init should have failed\"\n+\t\tfalse\n+\telif ! GIT_CONFIG=.gitmodules git-config module.foo.path lib\n+\tthen\n+\t\techo \"[OOPS] init failed but so did git-config\"\n+\tfi\n+'\n+\n test_expect_success 'init should register submodule url in .git/config' '\n \tgit-submodule init &&\n-\turl=$(git-config submodule.lib.url) &&\n-\tif test \"$url\" != \"git://example.com/lib.git\"\n+\turl=$(git-config submodule.foo.url) &&\n+\tif test \"$url\" != \"git://example.com/libfoo.git\"\n \tthen\n \t\techo \"[OOPS] init succeeded but submodule url is wrong\"\n \t\tfalse\n-\telif ! git-config submodule.lib.url ./.subrepo\n+\telif ! git-config submodule.foo.url ./.subrepo\n \tthen\n \t\techo \"[OOPS] init succeeded but update of url failed\"\n \t\tfalse\n@@ -72,7 +83,7 @@ test_expect_success 'update should fail when path is used by a file' '\n \tthen\n \t\techo \"[OOPS] update should have failed\"\n \t\tfalse\n-\telif test -f lib && test \"$(cat lib)\" != \"hello\"\n+\telif test \"$(cat lib)\" != \"hello\"\n \tthen\n \t\techo \"[OOPS] update failed but lib file was molested\"\n \t\tfalse\n-- \n1.5.2.1.914.gbd3a7\n"},{"id":"44492","messageId":"11814251322779-git-send-email-hjemli@gmail.com","threadId":"8535","inReplyTo":"1181425132239-git-send-email-hjemli@gmail.com","subject":"[PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-09T21:38:51Z","receivedAt":"2007-06-09T21:38:51Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"This adds documentation for the .gitmodules file.\n\nSigned-off-by: Lars Hjemli <hjemli@gmail.com>\n---\n Documentation/Makefile       |    2 +-\n Documentation/gitmodules.txt |   63 ++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 64 insertions(+), 1 deletions(-)\n create mode 100644 Documentation/gitmodules.txt\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 9cef480..2ad18e0 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -2,7 +2,7 @@ MAN1_TXT= \\\n \t$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \\\n \t\t$(wildcard git-*.txt)) \\\n \tgitk.txt\n-MAN5_TXT=gitattributes.txt gitignore.txt\n+MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt\n MAN7_TXT=git.txt\n \n DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))\ndiff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt\nnew file mode 100644\nindex 0000000..37888c9\n--- /dev/null\n+++ b/Documentation/gitmodules.txt\n@@ -0,0 +1,63 @@\n+gitmodules(5)\n+=============\n+\n+NAME\n+----\n+gitmodules - defining submodule properties\n+\n+SYNOPSIS\n+--------\n+.gitmodules\n+\n+\n+DESCRIPTION\n+-----------\n+\n+The `.gitmodules` file, located in the top-level directory of a\n+gitlink:git[7] working tree, is a text file with a layout matching the\n+requirements of gitlink:git-config[1].\n+\n+The file consists of sections named `module`, divided into one subsection\n+per submodule. The subsections are named with the logical name of the\n+submodule it describes.\n+\n+Each submodule can contain the following keys.\n+\n+module.$name.path::\n+\tDefine a path, relative to the top-level directory of the git\n+\tworking tree, where the submodule is expected to be checked out.\n+\n+module.$name.url::\n+\tDefine a url from where the submodule repository can be cloned.\n+\n+\n+EXAMPLES\n+--------\n+\n+Consider the following .gitmodules file:\n+\n+\t[module 'libfoo']\n+\t\tpath = include/foo\n+\t\turl = git://example1.com/git/libfoo.git\n+\n+\t[module 'libbar']\n+\t\turl = git://example2.com/pub/git/libbar.git\n+\n+\n+This defines two submodules, `libfoo` and `libbar`. The former specifies\n+both a checkout path and a suggested url, while the latter only specifies\n+a url. This file would make gitlink:git-submodule[1] map the path\n+`include/foo` to the submodule `libfoo` and the path `libbar` to the\n+submodule `libbar`.\n+\n+SEE ALSO\n+--------\n+gitlink:git-submodule[1] gitlink:git-config[1]\n+\n+DOCUMENTATION\n+-------------\n+Documentation by Lars Hjemli <hjemli@gmail.com>\n+\n+GIT\n+---\n+Part of the gitlink:git[7] suite\n-- \n1.5.2.1.914.gbd3a7\n"},{"id":"44495","messageId":"11814251333211-git-send-email-hjemli@gmail.com","threadId":"8535","inReplyTo":"1181425132239-git-send-email-hjemli@gmail.com","subject":"[PATCH 3/3] t7400: barf if git-submodule removes or replaces a file","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-09T21:38:52Z","receivedAt":"2007-06-09T21:38:52Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"The test for an unmolested file wouldn't fail properly if the file had been\nremoved or replaced by something other than a regular file. This fixes it.\n\nSigned-off-by: Lars Hjemli <hjemli@gmail.com>\n---\n t/t7400-submodule-basic.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 3940433..74fafce 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -72,7 +72,7 @@ test_expect_success 'update should fail when path is used by a file' '\n \tthen\n \t\techo \"[OOPS] update should have failed\"\n \t\tfalse\n-\telif test -f lib && test \"$(cat lib)\" != \"hello\"\n+\telif test \"$(cat lib)\" != \"hello\"\n \tthen\n \t\techo \"[OOPS] update failed but lib file was molested\"\n \t\tfalse\n-- \n1.5.2.1.914.gbd3a7\n"},{"id":"44516","messageId":"7vbqfod57b.fsf@assigned-by-dhcp.cox.net","threadId":"8535","inReplyTo":"1181425132294-git-send-email-hjemli@gmail.com","subject":"Re: [PATCH 1/3] git-submodule: allow submodule name and path to differ","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-10T00:27:20Z","receivedAt":"2007-06-10T00:27:20Z","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> This teaches git-submodule to check module.*.path when looking for the\n> config for a submodule path. If no match is found it falls back to the\n> current behaviour (module.$path).\n\nI have a feeling that it might be much less troublesome in the\nlonger term to admit that module.$path was a mistake and support\nonly one format; wouldn't trying to support both leave ambiguity\nand confusion?\n"},{"id":"44517","messageId":"20070610002802.GD31707@planck.djpig.de","threadId":"8535","inReplyTo":"11814251322779-git-send-email-hjemli@gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-06-10T00:28:02Z","receivedAt":"2007-06-10T00:28:02Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"The unofficial git documentation nitpicker at work ;)\n\nOn Sat, Jun 09, 2007 at 11:38:51PM +0200, Lars Hjemli wrote:\n> +The `.gitmodules` file, located in the top-level directory of a\n> +gitlink:git[7] working tree, is a text file with a layout matching the\n\nThat link seems superfluous to me.\nI would have used \"syntax\" instead of \"layout\".\n\n> +requirements of gitlink:git-config[1].\n> +\n> +The file consists of sections named `module`, divided into one subsection\n> +per submodule. The subsections are named with the logical name of the\n> +submodule it describes.\n\n\"sections named module\" sounds confusing to me. Why are there multiple\nsections named module? (for the record: I know what you mean, I just\ndon't know if it couldn't be said simpler)\nMaybe better \"subsections of section `module`, one per submodule\"?\nHmm, sounds ugly too.\n\n> +Each submodule can contain the following keys.\n> +\n> +module.$name.path::\n> +\tDefine a path, relative to the top-level directory of the git\n> +\tworking tree, where the submodule is expected to be checked out.\n> +\n> +module.$name.url::\n> +\tDefine a url from where the submodule repository can be cloned.\n\nFor .path a \"Defaults to name of submodule\" probably wouldn't hurt.\n\nFor the sake of documentation consistency I would suggest\nmodule.<name>.path. You can compare the output of\n$ grep \"\\.<[a-z]\" Documentation/*.txt\nwith\n$ grep \"\\.\\$[a-z]\" Documentation/*.txt\nto see what I mean.\n\n> +\t[module 'libfoo']\n> +\t\tpath = include/foo\n> +\t\turl = git://example1.com/git/libfoo.git\n> +\n> +\t[module 'libbar']\n> +\t\turl = git://example2.com/pub/git/libbar.git\n\nThis would actually be a syntax error in a git config file\n(subsection names can be enclosed in \"\" but not '').\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"44533","messageId":"Pine.LNX.4.64.0706100820560.4059@racer.site","threadId":"8535","inReplyTo":"7vbqfod57b.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/3] git-submodule: allow submodule name and path to differ","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-06-10T07:25:43Z","receivedAt":"2007-06-10T07:25:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 9 Jun 2007, Junio C Hamano wrote:\n\n> Lars Hjemli <hjemli@gmail.com> writes:\n> \n> > This teaches git-submodule to check module.*.path when looking for the \n> > config for a submodule path. If no match is found it falls back to the \n> > current behaviour (module.$path).\n> \n> I have a feeling that it might be much less troublesome in the longer \n> term to admit that module.$path was a mistake and support only one \n> format; wouldn't trying to support both leave ambiguity and confusion?\n\nJust my 2cents: git-submodule is not yet in any released version. So let's \nfix things early. In our world, it's not like you lose face when you have \nto admit mistakes. (Instead, you lose face when you refuse to fix them.) \nAh, if only politics learnt from our world...\n\nCiao,\nDscho\n"},{"id":"44546","messageId":"7vps448bgx.fsf@assigned-by-dhcp.cox.net","threadId":"8535","inReplyTo":"Pine.LNX.4.64.0706100820560.4059@racer.site","subject":"Re: [PATCH 1/3] git-submodule: allow submodule name and path to differ","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-10T08:23:10Z","receivedAt":"2007-06-10T08:23:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Sat, 9 Jun 2007, Junio C Hamano wrote:\n>\n>> Lars Hjemli <hjemli@gmail.com> writes:\n>> \n>> > This teaches git-submodule to check module.*.path when looking for the \n>> > config for a submodule path. If no match is found it falls back to the \n>> > current behaviour (module.$path).\n>> \n>> I have a feeling that it might be much less troublesome in the longer \n>> term to admit that module.$path was a mistake and support only one \n>> format; wouldn't trying to support both leave ambiguity and confusion?\n>\n> Just my 2cents: git-submodule is not yet in any released version. So let's \n> fix things early. In our world, it's not like you lose face when you have \n> to admit mistakes. (Instead, you lose face when you refuse to fix them.) \n> Ah, if only politics learnt from our world...\n\nWell, I completely agree with what you said up to \"So let's fix\nthings early.\", but when I re-read what I wrote, I realize that\nmy wording was bad --- I did not mean to drive the discussion in\nthat direction.\n\nIt was not Lars's *mistake* to admit to begin with.  His was one\nvalid design that was consistent within his patch series.  The\nthing is that there just was a better alternative suggested\nlater; it does not make the first iteration a mistake in any\nway.\n\nSo, Lars, my apologies if I offended you -- I did not mean it\nthat way.\n"},{"id":"44551","messageId":"8c5c35580706100137m3c3f3d24n873f2474a8835e0e@mail.gmail.com","threadId":"8535","inReplyTo":"7vbqfod57b.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/3] git-submodule: allow submodule name and path to differ","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-10T08:37:58Z","receivedAt":"2007-06-10T08:37:58Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/10/07, Junio C Hamano <gitster@pobox.com> wrote:\n> Lars Hjemli <hjemli@gmail.com> writes:\n>\n> > This teaches git-submodule to check module.*.path when looking for the\n> > config for a submodule path. If no match is found it falls back to the\n> > current behaviour (module.$path).\n>\n> I have a feeling that it might be much less troublesome in the\n> longer term to admit that module.$path was a mistake and support\n> only one format;\n\nHmm, what the patch does should match what is described in\n\n  http://article.gmane.org/gmane.comp.version-control.git/48879\n\nexcept that I've kept [module] instead of renaming it to [submodule].\nBut my wording (\"module.$path\") might be disconcerting :)\n\nFwiw: I do admit that the [path \"path\"] construct was a mistake.\n\n-- \nlarsh\n"},{"id":"44556","messageId":"8c5c35580706100142j38cc18a6tf4a23bd0c82afb82@mail.gmail.com","threadId":"8535","inReplyTo":"7vps448bgx.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/3] git-submodule: allow submodule name and path to differ","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-10T08:42:43Z","receivedAt":"2007-06-10T08:42:43Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/10/07, Junio C Hamano <gitster@pobox.com> wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n> > On Sat, 9 Jun 2007, Junio C Hamano wrote:\n> >\n> >> Lars Hjemli <hjemli@gmail.com> writes:\n> >>\n> >> > This teaches git-submodule to check module.*.path when looking for the\n> >> > config for a submodule path. If no match is found it falls back to the\n> >> > current behaviour (module.$path).\n> >>\n> >> I have a feeling that it might be much less troublesome in the longer\n> >> term to admit that module.$path was a mistake and support only one\n> >> format; wouldn't trying to support both leave ambiguity and confusion?\n> >\n> > Just my 2cents: git-submodule is not yet in any released version. So let's\n> > fix things early. In our world, it's not like you lose face when you have\n> > to admit mistakes. (Instead, you lose face when you refuse to fix them.)\n> > Ah, if only politics learnt from our world...\n>\n> Well, I completely agree with what you said up to \"So let's fix\n> things early.\", but when I re-read what I wrote, I realize that\n> my wording was bad --- I did not mean to drive the discussion in\n> that direction.\n>\n> It was not Lars's *mistake* to admit to begin with.  His was one\n> valid design that was consistent within his patch series.  The\n> thing is that there just was a better alternative suggested\n> later; it does not make the first iteration a mistake in any\n> way.\n>\n> So, Lars, my apologies if I offended you -- I did not mean it\n> that way.\n\nNo need for apologies, no offence taken :)\n\n-- \nlarsh\n"},{"id":"44562","messageId":"8c5c35580706100158n7dabfce4y5f79f8943d8abb87@mail.gmail.com","threadId":"8535","inReplyTo":"20070610002802.GD31707@planck.djpig.de","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-10T08:58:29Z","receivedAt":"2007-06-10T08:58:29Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/10/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:\n> The unofficial git documentation nitpicker at work ;)\n\nThat's good, keep it up :)\n\n>\n> On Sat, Jun 09, 2007 at 11:38:51PM +0200, Lars Hjemli wrote:\n> > +The `.gitmodules` file, located in the top-level directory of a\n> > +gitlink:git[7] working tree, is a text file with a layout matching the\n>\n> That link seems superfluous to me.\n\nYeah, what I really wanted here was a link to the definition of \"git\nworking tree\". I'll drop it.\n\n> I would have used \"syntax\" instead of \"layout\".\n\nAgreed\n\n>\n> > +requirements of gitlink:git-config[1].\n> > +\n> > +The file consists of sections named `module`, divided into one subsection\n> > +per submodule. The subsections are named with the logical name of the\n> > +submodule it describes.\n>\n> \"sections named module\" sounds confusing to me. Why are there multiple\n> sections named module? (for the record: I know what you mean, I just\n> don't know if it couldn't be said simpler)\n> Maybe better \"subsections of section `module`, one per submodule\"?\n> Hmm, sounds ugly too.\n\nGood documentation is hard, so I'll work on it some more...\n\n>\n> > +Each submodule can contain the following keys.\n> > +\n> > +module.$name.path::\n> > +     Define a path, relative to the top-level directory of the git\n> > +     working tree, where the submodule is expected to be checked out.\n> > +\n> > +module.$name.url::\n> > +     Define a url from where the submodule repository can be cloned.\n>\n> For .path a \"Defaults to name of submodule\" probably wouldn't hurt.\n\nTrue. But there might be some issues with this rule, so I'll leave it\nas is for now.\n\n>\n> For the sake of documentation consistency I would suggest\n> module.<name>.path. You can compare the output of\n> $ grep \"\\.<[a-z]\" Documentation/*.txt\n> with\n> $ grep \"\\.\\$[a-z]\" Documentation/*.txt\n> to see what I mean.\n\nThat was very descriptive, thanks!\n\n>\n> > +     [module 'libfoo']\n> > +             path = include/foo\n> > +             url = git://example1.com/git/libfoo.git\n> > +\n> > +     [module 'libbar']\n> > +             url = git://example2.com/pub/git/libbar.git\n>\n> This would actually be a syntax error in a git config file\n> (subsection names can be enclosed in \"\" but not '').\n\nShame on me for drinking while documenting ;-)\n\nThanks for the review, I'll try to send a fixed-up patch later today.\n\n--\nlarsh\n"},{"id":"44571","messageId":"Pine.LNX.4.64.0706101048120.4059@racer.site","threadId":"8535","inReplyTo":"8c5c35580706100158n7dabfce4y5f79f8943d8abb87@mail.gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-06-10T09:48:58Z","receivedAt":"2007-06-10T09:48:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 10 Jun 2007, Lars Hjemli wrote:\n\n> Shame on me for drinking while documenting ;-)\n\nSo I'm not the only one trying to cheer me up with some ethanol-containing \nbeverage, when writing documentation?\n\nCiao,\nDscho\n"},{"id":"44579","messageId":"8c5c35580706100310s7e08c22ake8956e2aaa216978@mail.gmail.com","threadId":"8535","inReplyTo":"Pine.LNX.4.64.0706101048120.4059@racer.site","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-10T10:10:37Z","receivedAt":"2007-06-10T10:10:37Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/10/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Sun, 10 Jun 2007, Lars Hjemli wrote:\n>\n> > Shame on me for drinking while documenting ;-)\n>\n> So I'm not the only one trying to cheer me up with some ethanol-containing\n> beverage, when writing documentation?\n>\n\nNope, you're not alone. Certain activities do require lots of stimuli\n(also known as \"Gourmet Stout\" :)\n\n-- \nlarsh\n"},{"id":"44591","messageId":"20070610121202.GD955MdfPADPa@greensroom.kotnet.org","threadId":"8535","inReplyTo":"8c5c35580706100158n7dabfce4y5f79f8943d8abb87@mail.gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-10T12:12:02Z","receivedAt":"2007-06-10T12:12:02Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sun, Jun 10, 2007 at 10:58:29AM +0200, Lars Hjemli wrote:\n> On 6/10/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:\n> >> +Each submodule can contain the following keys.\n> >> +\n> >> +module.$name.path::\n> >> +     Define a path, relative to the top-level directory of the git\n> >> +     working tree, where the submodule is expected to be checked out.\n> >> +\n> >> +module.$name.url::\n> >> +     Define a url from where the submodule repository can be cloned.\n> >\n> >For .path a \"Defaults to name of submodule\" probably wouldn't hurt.\n> \n> True. But there might be some issues with this rule, so I'll leave it\n> as is for now.\n\nAnd what might those issues be?\n\nHow about adding something like\n\n\tFor a given path relative to the top-level directory of the\n\tgit working tree, the logical name of the submodule at that\n\tpath (if any) is the submodule <name> with a module.<name>.path\n\tvalue equal to that path, or, if no such submodule exists, the\n\tsubmodule <path>.  It is an error for different submodules to have\n\tidentical path values.\n\nFor uniformity, you may also want to specify that a path value\nmust (or must not) end with a slash.\n\nOther than that, I like it.\nIt doesn't have the extensions proposed by Linus, but it seems\nto be forward compatible with them.\n\nskimo\n"},{"id":"44593","messageId":"8c5c35580706100530g256de4a4yb12f4647dae06500@mail.gmail.com","threadId":"8535","inReplyTo":"20070610121202.GD955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-10T12:30:58Z","receivedAt":"2007-06-10T12:30:58Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/10/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Sun, Jun 10, 2007 at 10:58:29AM +0200, Lars Hjemli wrote:\n> > On 6/10/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:\n> > >> +Each submodule can contain the following keys.\n> > >> +\n> > >> +module.$name.path::\n> > >> +     Define a path, relative to the top-level directory of the git\n> > >> +     working tree, where the submodule is expected to be checked out.\n> > >> +\n> > >> +module.$name.url::\n> > >> +     Define a url from where the submodule repository can be cloned.\n> > >\n> > >For .path a \"Defaults to name of submodule\" probably wouldn't hurt.\n> >\n> > True. But there might be some issues with this rule, so I'll leave it\n> > as is for now.\n>\n> And what might those issues be?\n\nThere's been some discussion about allowing a default value for path, see\n  http://comments.gmane.org/gmane.comp.version-control.git/49620\n\n>\n> How about adding something like\n>\n>         For a given path relative to the top-level directory of the\n>         git working tree, the logical name of the submodule at that\n>         path (if any) is the submodule <name> with a module.<name>.path\n>         value equal to that path, or, if no such submodule exists, the\n>         submodule <path>.  It is an error for different submodules to have\n>         identical path values.\n>\n> For uniformity, you may also want to specify that a path value\n> must (or must not) end with a slash.\n\nNice suggestions, I'll try to come up with a new patch later today\n\n> Other than that, I like it.\n\nThanks :)\n\n> It doesn't have the extensions proposed by Linus, but it seems\n> to be forward compatible with them.\n\nI'm trying to take baby-steps with the submodule support, so the\nmodule/submodule extension Linus talked about would possibly come at a\nlater stage.\n\nHmm, maybe I should just rename [module] to [submodule] right now? It\nwould be better forward compatible with the proposed extension, it\nwould 'harmonize' the section names used in .gitmodules and\n.git/config, and it would offer a clean break from what's currently\nsupported in 'master'.\n\n--\nlarsh\n"},{"id":"44595","messageId":"20070610124052.GE955MdfPADPa@greensroom.kotnet.org","threadId":"8535","inReplyTo":"8c5c35580706100530g256de4a4yb12f4647dae06500@mail.gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-10T12:40:52Z","receivedAt":"2007-06-10T12:40:52Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sun, Jun 10, 2007 at 02:30:58PM +0200, Lars Hjemli wrote:\n> On 6/10/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> >On Sun, Jun 10, 2007 at 10:58:29AM +0200, Lars Hjemli wrote:\n> >> >For .path a \"Defaults to name of submodule\" probably wouldn't hurt.\n> >>\n> >> True. But there might be some issues with this rule, so I'll leave it\n> >> as is for now.\n> >\n> >And what might those issues be?\n> \n> There's been some discussion about allowing a default value for path, see\n>  http://comments.gmane.org/gmane.comp.version-control.git/49620\n\nEuhm... this just points back to this thread...\nor are you referring to Junio's misinterpretation of the patch 1/3 \ncommit message?\n\n> >It doesn't have the extensions proposed by Linus, but it seems\n> >to be forward compatible with them.\n> \n> I'm trying to take baby-steps with the submodule support, so the\n> module/submodule extension Linus talked about would possibly come at a\n> later stage.\n> \n> Hmm, maybe I should just rename [module] to [submodule] right now?\n\nI don't see the need, but if you _really_ can't resist then please do it\nsooner rather than later.\n\nskimo\n"},{"id":"44597","messageId":"8c5c35580706100551y52639ce3m7a2be93a3289be1c@mail.gmail.com","threadId":"8535","inReplyTo":"20070610124052.GE955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-10T12:51:59Z","receivedAt":"2007-06-10T12:51:59Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/10/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Sun, Jun 10, 2007 at 02:30:58PM +0200, Lars Hjemli wrote:\n> > On 6/10/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> > >On Sun, Jun 10, 2007 at 10:58:29AM +0200, Lars Hjemli wrote:\n> > >> >For .path a \"Defaults to name of submodule\" probably wouldn't hurt.\n> > >>\n> > >> True. But there might be some issues with this rule, so I'll leave it\n> > >> as is for now.\n> > >\n> > >And what might those issues be?\n> >\n> > There's been some discussion about allowing a default value for path, see\n> >  http://comments.gmane.org/gmane.comp.version-control.git/49620\n>\n> Euhm... this just points back to this thread...\n\nI know ;-)\n\n> or are you referring to Junio's misinterpretation of the patch 1/3\n> commit message?\n\nWell, yes, I _think_ it's a misinterpretation but there is always the\npossibility of me being exceptionally slow and not getting his point.\n\n>\n> > >It doesn't have the extensions proposed by Linus, but it seems\n> > >to be forward compatible with them.\n> >\n> > I'm trying to take baby-steps with the submodule support, so the\n> > module/submodule extension Linus talked about would possibly come at a\n> > later stage.\n> >\n> > Hmm, maybe I should just rename [module] to [submodule] right now?\n>\n> I don't see the need, but if you _really_ can't resist then please do it\n> sooner rather than later.\n\nOk\n\n--\nlarsh\n"},{"id":"44638","messageId":"7vzm377cjk.fsf@assigned-by-dhcp.cox.net","threadId":"8535","inReplyTo":"8c5c35580706100530g256de4a4yb12f4647dae06500@mail.gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-10T20:57:35Z","receivedAt":"2007-06-10T20:57:35Z","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> Hmm, maybe I should just rename [module] to [submodule] right now? It\n> would be better forward compatible with the proposed extension, it\n> would 'harmonize' the section names used in .gitmodules and\n> .git/config, and it would offer a clean break from what's currently\n> supported in 'master'.\n\nYes, the difference between '[submodule]' vs '[module]' in\n.git/config and .gitmodules confused me while looking at your\nlatest patch series.  I am in favor of unifying them.  We would\nnot be breaking any released version if we harmonize them now.\n"},{"id":"44639","messageId":"8c5c35580706101414r72c45e84q2b81083f8f88ec40@mail.gmail.com","threadId":"8535","inReplyTo":"7vzm377cjk.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-10T21:14:27Z","receivedAt":"2007-06-10T21:14:27Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/10/07, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Lars Hjemli\" <hjemli@gmail.com> writes:\n>\n> > Hmm, maybe I should just rename [module] to [submodule] right now? It\n> > would be better forward compatible with the proposed extension, it\n> > would 'harmonize' the section names used in .gitmodules and\n> > .git/config, and it would offer a clean break from what's currently\n> > supported in 'master'.\n>\n> Yes, the difference between '[submodule]' vs '[module]' in\n> .git/config and .gitmodules confused me while looking at your\n> latest patch series.  I am in favor of unifying them.  We would\n> not be breaking any released version if we harmonize them now.\n>\n\nGood, then I'll do it that way. And I'll drop the \"unless otherwise\nnoted, name=path\" behaviour. If we later decide it would be useful we\ncan always \"re-add\" it.\n\n--\nlarsh\n"},{"id":"44705","messageId":"20070611083406.GH955MdfPADPa@greensroom.kotnet.org","threadId":"8535","inReplyTo":"8c5c35580706101414r72c45e84q2b81083f8f88ec40@mail.gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-11T08:34:06Z","receivedAt":"2007-06-11T08:34:06Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Sun, Jun 10, 2007 at 11:14:27PM +0200, Lars Hjemli wrote:\n> And I'll drop the \"unless otherwise\n> noted, name=path\" behaviour. If we later decide it would be useful we\n> can always \"re-add\" it.\n\nSo every (sub)module subsection will have to have a path element?\nWhy?\n\nskimo\n"},{"id":"44717","messageId":"8c5c35580706110347u55a944ds86f06dabce9e6435@mail.gmail.com","threadId":"8535","inReplyTo":"20070611083406.GH955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-11T10:47:43Z","receivedAt":"2007-06-11T10:47:43Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/11/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> On Sun, Jun 10, 2007 at 11:14:27PM +0200, Lars Hjemli wrote:\n> > And I'll drop the \"unless otherwise\n> > noted, name=path\" behaviour. If we later decide it would be useful we\n> > can always \"re-add\" it.\n>\n> So every (sub)module subsection will have to have a path element?\n\nYes\n\n> Why?\n\nIt addresses Junio's concern about ambiguity and confusion. And it\nfelt like the 'safe choice', i.e. starting out with a strict rule and\npossibly loosen it later on is a lot easier than starting loose and\nthen trying to make it stricter.\n\nBtw: adding support for the optional path specification on top of my\nlatest patch-series is trivial:\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 89a3885..297272b 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -34,8 +34,7 @@ module_name()\n {\n        name=$(GIT_CONFIG=.gitmodules git-config --get-regexp\n'^submodule\\..*\\.path$' \"$1\" |\n        sed -nre 's/^submodule\\.(.+)\\.path .+$/\\1/p')\n-       test -z \"$name\" &&\n-       die \"No submodule mapping found in .gitmodules for path '$path'\"\n+       test -z \"$name\" && name=\"$path\"\n        echo \"$name\"\n }\n\n--\nlarsh\n"},{"id":"44718","messageId":"20070611110445.GJ955MdfPADPa@greensroom.kotnet.org","threadId":"8535","inReplyTo":"8c5c35580706110347u55a944ds86f06dabce9e6435@mail.gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Sven Verdoolaege","fromEmail":"skimo@kotnet.org","sentAt":"2007-06-11T11:04:45Z","receivedAt":"2007-06-11T11:04:45Z","isPatch":true,"sender":{"key":"skimo@kotnet.org","avatar":null},"body":"On Mon, Jun 11, 2007 at 12:47:43PM +0200, Lars Hjemli wrote:\n> On 6/11/07, Sven Verdoolaege <skimo@kotnet.org> wrote:\n> >On Sun, Jun 10, 2007 at 11:14:27PM +0200, Lars Hjemli wrote:\n> >> And I'll drop the \"unless otherwise\n> >> noted, name=path\" behaviour. If we later decide it would be useful we\n> >> can always \"re-add\" it.\n> >\n> >So every (sub)module subsection will have to have a path element?\n> \n> Yes\n> \n> >Why?\n> \n> It addresses Junio's concern about ambiguity and confusion.\n\nJunio, is this really what you meant?\n\nLinus even advocated removing the mapping completely\n(http://article.gmane.org/gmane.comp.version-control.git/48871),\nbut I wouldn't go that far.\n\nskimo\n"},{"id":"44735","messageId":"7vodjmqxck.fsf@assigned-by-dhcp.pobox.com","threadId":"8535","inReplyTo":"20070611110445.GJ955MdfPADPa@greensroom.kotnet.org","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-11T16:17:47Z","receivedAt":"2007-06-11T16:17:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sven Verdoolaege <skimo@kotnet.org> writes:\n\n>> >Why?\n>> \n>> It addresses Junio's concern about ambiguity and confusion.\n>\n> Junio, is this really what you meant?\n\nI think I initially misread Lars's patch and log message that\nsaid:\n\n    This teaches git-submodule to check module.*.path when looking for the\n    config for a submodule path. If no match is found it falls back to the\n    current behaviour (module.$path).\n\nSomehow I thought that it would make it ambiguous to have\nmodule.$name.path and module.$path when answering the question:\n\"given a name of a module how would you find which path to bind\nit to\".\n\nBut I do not think it is a problem; at least \"ambiguity\" worry\nis unfounded.  This section, without \"path = \" line:\n\n\t[module \"foo\"]\n        \turl = ...\n\nis equivalent to have \"path = foo\" in it.  Finding path from\nmodule name is well defined.\n\nThe other, finding what module should go to a given path, is not\nwell defined.  IOW, you would not know which module you want at\nthe path bar/ when you have:\n\n\t[module \"foo\"]\n        \turl = ...\n                path = bar\n\t[module \"bar\"]\n        \turl = ...\n\nBut that problem exists with or without these \"module.*.path\nand module.$path\", so it cannot be an argument against the\ndefinition of the fallback behaviour.\n"},{"id":"44949","messageId":"20070613153611.GA11852@moooo.ath.cx","threadId":"8535","inReplyTo":"11814251322779-git-send-email-hjemli@gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Matthias Lederhofer","fromEmail":"matled@gmx.net","sentAt":"2007-06-13T15:36:11Z","receivedAt":"2007-06-13T15:36:11Z","isPatch":true,"sender":{"key":"matled@gmx.net","avatar":null},"body":"Lars Hjemli <hjemli@gmail.com> wrote:\n> +SYNOPSIS\n> +--------\n> +.gitmodules\n\nMy asciidoc (7.1.2 and 8.2.1) generates an empty refsynopsisdiv from\nthis.  xmlto refuses to convert this into anything else:\n\nxmlto -m callouts.xsl man gitmodules.xml\nxmlto: input does not validate (status 3)\n/path/to/git/Documentation/gitmodules.xml:15: element refsynopsisdiv: validity error : Element refsynopsisdiv content does not follow the DTD, expecting (refsynopsisdivinfo? , (title , subtitle? , titleabbrev?)? , (((calloutlist | glosslist | itemizedlist | orderedlist | segmentedlist | simplelist | variablelist | caution | important | note | tip | warning | literallayout | programlisting | programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobjectco | informalequation | informalexample | informalfigure | informaltable | equation | example | figure | table | msgset | procedure | sidebar | qandaset | anchor | bridgehead | remark | highlights | abstract | authorblurb \n | epigraph | indexterm | beginpage)+ , refsect2*) | refsect2+)), got ()\nDocument /path/to/git/Documentation/gitmodules.xml does not validate\n\nThis breaks the build process for the documentation.  I could not find\nout how to fix this.  Probably just needs the right quoting for the\ndot at the beginning of the line.\n"},{"id":"44958","messageId":"8c5c35580706130913j2d3095d1n649145ff540d1bec@mail.gmail.com","threadId":"8535","inReplyTo":"20070613153611.GA11852@moooo.ath.cx","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-13T16:13:36Z","receivedAt":"2007-06-13T16:13:36Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/13/07, Matthias Lederhofer <matled@gmx.net> wrote:\n> Lars Hjemli <hjemli@gmail.com> wrote:\n> > +SYNOPSIS\n> > +--------\n> > +.gitmodules\n>\n> My asciidoc (7.1.2 and 8.2.1) generates an empty refsynopsisdiv from\n> this.  xmlto refuses to convert this into anything else:\n\nSorry about that, I don't have a working asciidoc :-(\n\nBut looking through the latest asciidoc-doc suggests that .gitmodules\nis treated like a blocktitle:\nhttp://www.methods.co.nz/asciidoc/userguide.html#toc33\n\nCould you please try one or both of the following escape-sequences?\n\n\\.gitmodules\n#.gitmodules#\n\n\nThanks\n\n--\nlarsh\n"},{"id":"44960","messageId":"7vd4zzg72i.fsf@assigned-by-dhcp.pobox.com","threadId":"8535","inReplyTo":"20070613153611.GA11852@moooo.ath.cx","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-13T16:20:05Z","receivedAt":"2007-06-13T16:20:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthias Lederhofer <matled@gmx.net> writes:\n\n> Lars Hjemli <hjemli@gmail.com> wrote:\n>> +SYNOPSIS\n>> +--------\n>> +.gitmodules\n>\n> My asciidoc (7.1.2 and 8.2.1) generates an empty refsynopsisdiv from\n> this.  xmlto refuses to convert this into anything else:\n> ...\n> This breaks the build process for the documentation.  I could not find\n> out how to fix this.  Probably just needs the right quoting for the\n> dot at the beginning of the line.\n\nSorry, I should have caught this much earlier, as already knew\nabout this issue when I did gitattributes(5).\n\nAs it seems to be customary not to even say 'dot' at the\nbeginning for man(5) section (existing examples I found are\nnetrc, postgresrc, procmailrc, ...), I think the best fix is\njust to do s/\\.gitmodules/gitmodules/ there.\n"},{"id":"44964","messageId":"20070613163136.GA28101@moooo.ath.cx","threadId":"8535","inReplyTo":"8c5c35580706130913j2d3095d1n649145ff540d1bec@mail.gmail.com","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Matthias Lederhofer","fromEmail":"matled@gmx.net","sentAt":"2007-06-13T16:31:36Z","receivedAt":"2007-06-13T16:31:36Z","isPatch":true,"sender":{"key":"matled@gmx.net","avatar":null},"body":"Lars Hjemli <hjemli@gmail.com> wrote:\n> Could you please try one or both of the following escape-sequences?\n> \n> \\.gitmodules\n> #.gitmodules#\n\n#.gitmodules# seems to produce a good xml file, html is fine too.  But\nthe conversion from xml to a manpage seems to be broken:\n\n    $ xmlto -m callouts.xsl man gitmodules.xml\n\ntransforms\n\n    <refsynopsisdiv>\n    <simpara>.gitmodules</simpara>\n\n    </refsynopsisdiv>\n\nto\n\n    .SH \"SYNOPSIS\"\n    .gitmodules\n\n\".gitmodules\" is not shown in the manpage and vim highlights the \".gi\"\njust like \".SH\" in a special color.  Perhaps we should just highlight\n.gitmodules like commands with single quotes.  This solves both\nproblems :)\n"},{"id":"44970","messageId":"8c5c35580706130959i7a2ac14dq723137d05ff14de1@mail.gmail.com","threadId":"8535","inReplyTo":"20070613163136.GA28101@moooo.ath.cx","subject":"Re: [PATCH 2/3] Add gitmodules(5)","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-13T16:59:18Z","receivedAt":"2007-06-13T16:59:18Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 6/13/07, Matthias Lederhofer <matled@gmx.net> wrote:\n> Lars Hjemli <hjemli@gmail.com> wrote:\n> > Could you please try one or both of the following escape-sequences?\n> >\n> > \\.gitmodules\n> > #.gitmodules#\n>\n> #.gitmodules# seems to produce a good xml file, html is fine too.  But\n> the conversion from xml to a manpage seems to be broken:\n>\n>     $ xmlto -m callouts.xsl man gitmodules.xml\n>\n> transforms\n>\n>     <refsynopsisdiv>\n>     <simpara>.gitmodules</simpara>\n>\n>     </refsynopsisdiv>\n>\n> to\n>\n>     .SH \"SYNOPSIS\"\n>     .gitmodules\n>\n> \".gitmodules\" is not shown in the manpage and vim highlights the \".gi\"\n> just like \".SH\" in a special color.  Perhaps we should just highlight\n> .gitmodules like commands with single quotes.  This solves both\n> problems :)\n>\n\nOk, thanks for trying to clean up my mess. I guess there's a good\nreason why Junios examples drop the leading dot (cat\n/usr/share/man/man1/git-submodule.1 was an eyeopener for me right now\n;-)\n\n-- \nlarsh\n"},{"id":"45007","messageId":"11817720703159-git-send-email-hjemli@gmail.com","threadId":"8535","inReplyTo":"7vd4zzg72i.fsf@assigned-by-dhcp.pobox.com","subject":"[PATCH] gitmodules(5): remove leading period from synopsis","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-06-13T22:01:10Z","receivedAt":"2007-06-13T22:01:10Z","isPatch":true,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"Asciidoc treats a line starting with a period followed by a title as a\nblocktitle element. My introduction of gitmodules(5) unfortunatly broke\nthe documentation build process due to this processing, since it made\nasciidoc generate an illegal (empty) synopsis element. Removing the leading\nperiod fixes the problem and also makes gitmodules(5) use the same synopsis\nnotation as gitattributes(5).\n\nNoticed-by: Matthias Lederhofer <matled@gmx.net>\nSigned-off-by: Lars Hjemli <hjemli@gmail.com>\n---\n\nSorry for the breakage, I'll try to get asciidoc working before submitting\nany more patches to Documentation/.\n\n Documentation/gitmodules.txt |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt\nindex 7814b6a..035294e 100644\n--- a/Documentation/gitmodules.txt\n+++ b/Documentation/gitmodules.txt\n@@ -7,7 +7,7 @@ gitmodules - defining submodule properties\n \n SYNOPSIS\n --------\n-.gitmodules\n+gitmodules\n \n \n DESCRIPTION\n-- \n1.5.2.1.914.gbd3a7\n"}]}