{"thread":{"id":"40505","subject":"Clarification on Submodule/Subproject naming","startedAt":"2015-10-06T22:00:44Z","lastAt":"2015-10-07T07:37:00Z","messageCount":3,"participants":["Stefan Beller","Jacob Keller","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"271247","messageId":"CAGZ79kYyagjxyV0Da3FW3zWuJ+wD=FTPvzYebV7ER4TjTnMXpg@mail.gmail.com","threadId":"40505","inReplyTo":null,"subject":"Clarification on Submodule/Subproject naming","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-10-06T22:00:44Z","receivedAt":"2015-10-06T22:00:44Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"So a discussing started in a Gerrit change [1] if we want to name it\nsubmodule or subproject.\nWe decided to stick with the git core convention of naming it\nsubproject for now.\n\nBut that lead me to the question: What is the difference of a\nsubmodule and a subproject?\n\nAs far as I can tell they are synonyms (internally also called\nGIT_LINK, but we never expose that to the users), where the term\nsubmodule was coined later in the game, subproject being there as the\nfirst term introduced in version 1.5.\n\nSo is it worth to unify that same concept hiding between two names?\n\nLooking through the code we cannot switch to submodule as the literal\nstring \"subproject\"\nis used for diffs in the plumbing layer.\n\nBut getting rid of submodule is also not easy, as there is\ngit-submodule.sh as a direct command.\n\nSo then there is also git subtree, which \"allow subprojects to be\nincluded within a subdirectory of the main project, optionally\nincluding the subproject’s entire history.\" (the man page)\n\nSo can I understand a subproject as either a submodule or a subtree ?\nIf so would it make sense to add an entry to gitglossary to state that\nsubprojects are generic term for\nhaving some kind of structure? (a subdirectory containing independent\nstuff could be considered a\nsubproject. i.e. We could make contrib/examples the historic-git subproject ?)\n\nAny advice welcome!\nStefan\n\n[1] https://gerrit-review.googlesource.com/#/c/70948/\n"},{"id":"271248","messageId":"CA+P7+xotGb8y2M0sjXmOmG0FofJtn_wsg3ASo-K62Ea9hk2mkQ@mail.gmail.com","threadId":"40505","inReplyTo":"CAGZ79kYyagjxyV0Da3FW3zWuJ+wD=FTPvzYebV7ER4TjTnMXpg@mail.gmail.com","subject":"Re: Clarification on Submodule/Subproject naming","fromName":"Jacob Keller","fromEmail":"jacob.keller@gmail.com","sentAt":"2015-10-06T22:05:24Z","receivedAt":"2015-10-06T22:05:24Z","isPatch":false,"sender":{"key":"jacob.keller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"On Tue, Oct 6, 2015 at 3:00 PM, Stefan Beller <sbeller@google.com> wrote:\n> So a discussing started in a Gerrit change [1] if we want to name it\n> submodule or subproject.\n> We decided to stick with the git core convention of naming it\n> subproject for now.\n>\n> But that lead me to the question: What is the difference of a\n> submodule and a subproject?\n>\n> As far as I can tell they are synonyms (internally also called\n> GIT_LINK, but we never expose that to the users), where the term\n> submodule was coined later in the game, subproject being there as the\n> first term introduced in version 1.5.\n>\n> So is it worth to unify that same concept hiding between two names?\n>\n\nI think it would be worth trying to sync up at least documentation if\npossible, and maybe even change the diff core output, but that depends\non whether we think changing that would break anyone? I'm not sure who\nit would hurt to just start using \"submodule\" instead of \"subproject\"\nthere?\n\n> Looking through the code we cannot switch to submodule as the literal\n> string \"subproject\"\n> is used for diffs in the plumbing layer.\n\nIs there a strong reason we can't just change the diff layer to\n\"submodule\" here? I'm not sure who or what that would hurt.\n\n>\n> But getting rid of submodule is also not easy, as there is\n> git-submodule.sh as a direct command.\n>\n\nI think we should stick to submodule as that is the name of the\ncommand as well as the general term understood by most users.\nSubproject is the older name that was used before submodule.\n\n> So then there is also git subtree, which \"allow subprojects to be\n> included within a subdirectory of the main project, optionally\n> including the subproject’s entire history.\" (the man page)\n\nI think the term subproject used here is used in a general sense, and\nnot in the specific sense used elsewhere.\n\n>\n> So can I understand a subproject as either a submodule or a subtree ?\n> If so would it make sense to add an entry to gitglossary to state that\n> subprojects are generic term for\n> having some kind of structure? (a subdirectory containing independent\n> stuff could be considered a\n> subproject. i.e. We could make contrib/examples the historic-git subproject ?)\n>\n\nIn terms of git diff core, subtrees are not shown as \"subproject\" in\nthe diffs at all, so I think in that sense subproject there is just an\nartifact of what got used in the past.\n\n> Any advice welcome!\n> Stefan\n>\n> [1] https://gerrit-review.googlesource.com/#/c/70948/\n"},{"id":"271253","messageId":"5614CB9C.2010701@web.de","threadId":"40505","inReplyTo":"CAGZ79kYyagjxyV0Da3FW3zWuJ+wD=FTPvzYebV7ER4TjTnMXpg@mail.gmail.com","subject":"Re: Clarification on Submodule/Subproject naming","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2015-10-07T07:37:00Z","receivedAt":"2015-10-07T07:37:00Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 07.10.2015 um 00:00 schrieb Stefan Beller:\n> So a discussing started in a Gerrit change [1] if we want to name it\n> submodule or subproject.\n> We decided to stick with the git core convention of naming it\n> subproject for now.\n\nWhat convention? Isn't diff output the only place where we talk\nabout subprojects?\n\n> But that lead me to the question: What is the difference of a\n> submodule and a subproject?\n\nA submodule is a certain kind subproject (using a GITLINK and a\n.gitmodules entry), but e.g. a GITLINK could be used by other\ntooling to represent subprojects without using a .gitmodules\nfile. So submodules are one in-core specialization of subprojects,\nthe other is git subtree (which doesn't even use GITLINKs).\n\n> As far as I can tell they are synonyms (internally also called\n> GIT_LINK, but we never expose that to the users), where the term\n> submodule was coined later in the game, subproject being there as the\n> first term introduced in version 1.5.\n>\n> So is it worth to unify that same concept hiding between two names?\n\nI doubt that, as one is a subset of the other.\n\n> Looking through the code we cannot switch to submodule as the literal\n> string \"subproject\"\n> is used for diffs in the plumbing layer.\n\nExactly, we cannot change that easily because of compatibility issues.\n\n> But getting rid of submodule is also not easy, as there is\n> git-submodule.sh as a direct command.\n\nYup, that would confuse lots of users and break tons of scripts.\n\n> So then there is also git subtree, which \"allow subprojects to be\n> included within a subdirectory of the main project, optionally\n> including the subproject’s entire history.\" (the man page)\n>\n> So can I understand a subproject as either a submodule or a subtree ?\n\nOr even some other method of embedding another repo.\n\n> If so would it make sense to add an entry to gitglossary to state that\n> subprojects are generic term for\n> having some kind of structure? (a subdirectory containing independent\n> stuff could be considered a\n> subproject. i.e. We could make contrib/examples the historic-git subproject ?)\n\nBetter documenting that is a good idea (though I'm not sure what you\nmean by making \"contrib/examples the historic-git subproject\").\n"}]}