{"thread":{"id":"39401","subject":"[PATCH] submodule documentation: Rewrite introductory paragraphs","startedAt":"2015-05-21T19:01:48Z","lastAt":"2015-05-21T19:01:48Z","messageCount":1,"participants":["Stefan Beller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"261838","messageId":"1432234908-32310-1-git-send-email-sbeller@google.com","threadId":"39401","inReplyTo":null,"subject":"[PATCH] submodule documentation: Rewrite introductory paragraphs","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-05-21T19:01:48Z","receivedAt":"2015-05-21T19:01:48Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"It's better to start the man page with a description of what submodules\nactually are instead of saying what they are not.\n\nReorder the paragraphs such that\nthe first short paragraph introduces the submodule concept,\nthe second paragraph highlights the usage of the submodule command,\nthe third paragraph giving background information,\nand finally the fourth paragraph discusing alternatives such\nas subtrees and remotes, which we don't want to be confused with.\n\nThis ordering deepens the knowledge on submodules with each paragraph.\nFirst the basic questions like \"How/what\" will be answered, while the\nunderlying concepts will be taught at a later time.\n\nMaking sure it is not confused with subtrees and remotes is not really\nenhancing knowledge of submodules itself, but rather painting the big\npicture of git concepts, so you could also argue to have it as the second\nparagraph. Personally I think this may confuse readers, specially newcomers\nthough.\n\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n\nI rewrote the first 2 paragraphs as well now. I think it doesn't make sense\nto mention any subcommand in the description section, so I removed \n \"When adding a new submodule to the tree, the 'add' subcommand is to be used.\"\nthough I kept the warning about submodules not being autmatically updated by\nclone and pull. All other subcommands are gone from the description.\n\n\n>> Not a new problem, but does the command really \"manage them for\n>> you\"?  I view it more like \"You can use this command to manage,\n>> inspect and update the submodules\".\n>\n> I agree.\n\nTrying to find a better wording I looked more closely at other man pages to get\nconsistent with them. Most of them (e.g. add, status, rebase, revert) just describe\nwhat they do in a short manner.\n\nNow I am looking at the subtree man page and it looks as if it written in a similar style\nto the submodules man page, the first 2 paragraphs give a short description what\nsubtrees do (not the command, but the concept) including an example.\nThe third paragraph then starts with \"Subtrees are not to be confused\nwith submodules, ...\" which I'd not want to see as early in a man page.\nSo in the subtree man page there is no such paragraph as\n \n    This command can do this and that.\n\nbut rather the concept and examples are given.\n\n Documentation/git-submodule.txt | 50 ++++++++++++++++++-----------------------\n 1 file changed, 22 insertions(+), 28 deletions(-)\n\ndiff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\nindex 2c25916..97718cf 100644\n--- a/Documentation/git-submodule.txt\n+++ b/Documentation/git-submodule.txt\n@@ -25,22 +25,17 @@ SYNOPSIS\n \n DESCRIPTION\n -----------\n-Submodules allow foreign repositories to be embedded within\n-a dedicated subdirectory of the source tree, always pointed\n-at a particular commit.\n+This command will inspect, update and manage submodules.\n \n-They are not to be confused with remotes, which are meant mainly\n-for branches of the same project; submodules are meant for\n-different projects you would like to make part of your source tree,\n-while the history of the two projects still stays completely\n-independent and you cannot modify the contents of the submodule\n-from within the main project.\n-If you want to merge the project histories and want to treat the\n-aggregated whole as a single project from then on, you may want to\n-add a remote for the other project and use the 'subtree' merge strategy,\n-instead of treating the other project as a submodule. Directories\n-that come from both projects can be cloned and checked out as a whole\n-if you choose to go that route.\n+Submodules allow you to keep another Git repository in a subdirectory\n+of your repository. The other repository has its own history, which does not\n+interfere with the history of the current repository. This can be used to\n+have external dependencies such as libraries for example.\n+\n+When cloning or pulling a repository containing submodules however,\n+these will not be checked out by default; the 'init' and 'update'\n+subcommands will maintain submodules checked out and at\n+appropriate revision in your working tree.\n \n Submodules are composed from a so-called `gitlink` tree entry\n in the main repository that refers to a particular commit object\n@@ -51,19 +46,18 @@ describes the default URL the submodule shall be cloned from.\n The logical name can be used for overriding this URL within your\n local repository configuration (see 'submodule init').\n \n-This command will manage the tree entries and contents of the\n-gitmodules file for you, as well as inspect the status of your\n-submodules and update them.\n-When adding a new submodule to the tree, the 'add' subcommand\n-is to be used.  However, when pulling a tree containing submodules,\n-these will not be checked out by default;\n-the 'init' and 'update' subcommands will maintain submodules\n-checked out and at appropriate revision in your working tree.\n-You can briefly inspect the up-to-date status of your submodules\n-using the 'status' subcommand and get a detailed overview of the\n-difference between the index and checkouts using the 'summary'\n-subcommand.\n-\n+Submodules are not to be confused with remotes, which are meant\n+mainly for branches of the same project; submodules are meant for\n+different projects you would like to make part of your source tree,\n+while the history of the two projects still stays completely\n+independent and you cannot modify the contents of the submodule\n+from within the main project.\n+If you want to merge the project histories and want to treat the\n+aggregated whole as a single project from then on, you may want to\n+add a remote for the other project and use the 'subtree' merge strategy,\n+instead of treating the other project as a submodule. Directories\n+that come from both projects can be cloned and checked out as a whole\n+if you choose to go that route.\n \n COMMANDS\n --------\n-- \n2.4.0.194.gc518059\n"}]}