{"thread":{"id":"51594","subject":"Suggestion: git clone should warn if repository has submodules","startedAt":"2019-08-06T14:04:12Z","lastAt":"2019-08-06T15:58:49Z","messageCount":3,"participants":["Jason Sewall","Mateusz Loskot","Michal Suchánek"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"379999","messageId":"CADqa0D5wVWk2wa-raeVmCEhCqYznpba4TeUW_7UQOA0huR-RAg@mail.gmail.com","threadId":"51594","inReplyTo":null,"subject":"Suggestion: git clone should warn if repository has submodules","fromName":"Jason Sewall","fromEmail":"jasonsewall@gmail.com","sentAt":"2019-08-06T14:03:57Z","receivedAt":"2019-08-06T14:04:12Z","isPatch":false,"sender":{"key":"jasonsewall@gmail.com","avatar":null},"body":"Submodules are great, and I used them at work. The problem is, people\nwind up cloning my repos without --recursive and then nothing works\nfor them, because  the submodules weren't populated and those\nultimately are needed to build my code.\n\nI can see why --recursive isn't the default for git clone; you don't\nwant to just blindly follow whatever urls are in .gitmodules without\nthe user being aware of the possibility. That said, folks that are not\nfamiliar with submodules (which seems to be most of the people I work\nwith!) wind up confused by this and don't know how to fix it.\n\nWhile the burden is on the user and should remain so, it seems like\nhaving git print out a message after cloning to the effect of \"there\nare submodules that are not populated, maybe you should look at them\"\nwould go a long way to eliminating confusion for newer users. Yes, I\nhave put some documentation in my project that users should fetch the\nsubmodules, but if possible, I'd like lower the number of times I have\nto suggest that people RTFM.\n\nAlternatively, is it preferable that I have my build system look at\nthe submodules and inform the user more helpfully? I'm curious to know\nwhat, if any, is the recommended procedure.\n\nCheers,\nJason\n"},{"id":"380006","messageId":"CABUeae9JhQ+JcNzYRMr40T2FTCJChYEz_riUr6Q1O5YO0uEDng@mail.gmail.com","threadId":"51594","inReplyTo":"CADqa0D5wVWk2wa-raeVmCEhCqYznpba4TeUW_7UQOA0huR-RAg@mail.gmail.com","subject":"Re: Suggestion: git clone should warn if repository has submodules","fromName":"Mateusz Loskot","fromEmail":"mateusz@loskot.net","sentAt":"2019-08-06T15:54:20Z","receivedAt":"2019-08-06T15:54:50Z","isPatch":false,"sender":{"key":"mateusz@loskot.net","avatar":"https://gravatar.com/avatar/fe5a0ce8995d4986f5c46aad6353e21717808da58e4bc710da1a100e247be239?d=mp&s=160"},"body":"On Tue, 6 Aug 2019 at 16:04, Jason Sewall <jasonsewall@gmail.com> wrote:\n>\n> Submodules are great, and I used them at work. The problem is, people\n> wind up cloning my repos without --recursive and then nothing works\n> for them, because  the submodules weren't populated and those\n> ultimately are needed to build my code.\n\nWhat you need is a simple document for your team that outlines the common\nGit workflow or README.md in root directory of your repositories with\nfat heading:\n\n## Clone\n\n```\ngit clone --recursive ...\n```\n\n\nA team in another company may require non-recursive clones by default\nand warnings from git may be quite annoying. Given the fact there is not\none but may valid \"my way\"-s available, acceptable and supported by Git,\nI think, babysitting behaviour is not quite aligned with its philosophy, is it?\n\nBest regards,\n-- \nMateusz Loskot, http://mateusz.loskot.net\n"},{"id":"380007","messageId":"20190806175847.677319bf@kitsune.suse.cz","threadId":"51594","inReplyTo":"CABUeae9JhQ+JcNzYRMr40T2FTCJChYEz_riUr6Q1O5YO0uEDng@mail.gmail.com","subject":"Re: Suggestion: git clone should warn if repository has submodules","fromName":"Michal Suchánek","fromEmail":"msuchanek@suse.de","sentAt":"2019-08-06T15:58:47Z","receivedAt":"2019-08-06T15:58:49Z","isPatch":false,"sender":{"key":"msuchanek@suse.de","avatar":"https://avatars.githubusercontent.com/u/787652?v=4"},"body":"On Tue, 6 Aug 2019 17:54:20 +0200\nMateusz Loskot <mateusz@loskot.net> wrote:\n\n> On Tue, 6 Aug 2019 at 16:04, Jason Sewall <jasonsewall@gmail.com> wrote:\n> >\n> > Submodules are great, and I used them at work. The problem is, people\n> > wind up cloning my repos without --recursive and then nothing works\n> > for them, because  the submodules weren't populated and those\n> > ultimately are needed to build my code.  \n> \n> What you need is a simple document for your team that outlines the common\n> Git workflow or README.md in root directory of your repositories with\n> fat heading:\n> \n> ## Clone\n> \n> ```\n> git clone --recursive ...\n> ```\n> \n> \n> A team in another company may require non-recursive clones by default\n> and warnings from git may be quite annoying. Given the fact there is not\n> one but may valid \"my way\"-s available, acceptable and supported by Git,\n> I think, babysitting behaviour is not quite aligned with its philosophy, is it?\n\nIt has warnings that you can disable globally or per-repository in\nconfiguration to fit your workflow.\n\nThanks\n\nMichal\n"}]}