{"thread":{"id":"27637","subject":"git clone and submodules","startedAt":"2011-06-16T13:13:30Z","lastAt":"2011-06-16T18:02:46Z","messageCount":2,"participants":["Massimo Manca","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"170131","messageId":"4DFA017A.5070206@micronengineering.it","threadId":"27637","inReplyTo":null,"subject":"git clone and submodules","fromName":"Massimo Manca","fromEmail":"massimo.manca@micronengineering.it","sentAt":"2011-06-16T13:13:30Z","receivedAt":"2011-06-16T13:13:30Z","isPatch":false,"sender":{"key":"massimo.manca@micronengineering.it","avatar":"https://gravatar.com/avatar/1c2a993a173142d1f7fe53dcf07a0769b89feebd2e9f6d618d9d13e2a7391a94?d=mp&s=160"},"body":"Hello,\non my windows notebook I have a local repo: h:\\Repositories\\RepoWR; it\ncontains 2 branches: the master and the 1.1.0 (that is a bug correction\nbranch). At now the 1.1.0 it is not merged on the master because we will\ncorrect more other bugs (one bug -> one branch).\n\n1. I need to clone the Repo, I mean the repo, working directory and\ncomplete branches and history.\nActually to do this I must make a brutal copy of the RepoWR folder\nbecause if I use git clone git doesn't clone also the master branch but\nonly the 1.1.0 branch that it is the active one (I used git checkout to\nactivate it).\n\nSo I am sure that I miss something and that this is a very common\nsituation, what I am doing wrong?\n\n2. RepoWR will contain a complex project developed by several engineers\nand made of some subprojects (already existent) and some libraries. I\nwould manage them as submodules, these are my intents:\na) the library mclib (about 50 c files) has its repo on a different\nlocation, I would \"connect\" its repo inside RepoWR as a submodule\nbecause I am sure that we need to modify/extend the library and we would\nto have the ability to modify it and propagate modifications to its\nrepo, forcing all users of mclib to see the modifications and to repeate\ntheir regression tests\nHow can implement this situation? Where can I find info or documentation?\n\nb) every module (not more the 4-5 c files) will be developed and unit\ntested, so normally every engineer makes a unit test project\nimplementing/using the module to test with TDD workflow. During the\nprogress of the work the modules must be added and committed to RepoWR;\nthe modules are on the working directory of RepoWR (RepoWR\\src) and the\ntest files on a specific subfolder (RepoWR\\TestModuleOne\\src).\nIs this a viable solution or are there hidden problems and so better\nsolution to implement?\n\n\nbegin:vcard\nfn:Massimo Manca\nn:Manca;Massimo\norg:Micron Engineering di Massimo Manca\nadr:;;via della Ferriera, 48;Pordenone;PN;33170;ITALIA\nemail;internet:massimo.manca@micronengineering.it\ntel;work:+39 0434 1856131\ntel;fax:+39 0434 1851032 / 178 273 3543\ntel;cell:+39 349 4504979\nurl:http://www.micronengineering.it\nversion:2.1\nend:vcard\n\n"},{"id":"170141","messageId":"4DFA4546.1020905@web.de","threadId":"27637","inReplyTo":"4DFA017A.5070206@micronengineering.it","subject":"Re: git clone and submodules","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2011-06-16T18:02:46Z","receivedAt":"2011-06-16T18:02:46Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 16.06.2011 15:13, schrieb Massimo Manca:\n> 2. RepoWR will contain a complex project developed by several engineers\n> and made of some subprojects (already existent) and some libraries. I\n> would manage them as submodules, these are my intents:\n> a) the library mclib (about 50 c files) has its repo on a different\n> location, I would \"connect\" its repo inside RepoWR as a submodule\n> because I am sure that we need to modify/extend the library and we would\n> to have the ability to modify it and propagate modifications to its\n> repo, forcing all users of mclib to see the modifications and to repeate\n> their regression tests\n\nThat sounds like submodules would fit in nicely here.\n\n> How can implement this situation? Where can I find info or documentation?\n\nhttp://progit.org/book/ch6-6.html\nhttp://www.kernel.org/pub/software/scm/git/docs/user-manual.html#submodules\n\nAnd for questions not answered there feel free to ask.\n\n> b) every module (not more the 4-5 c files) will be developed and unit\n> tested, so normally every engineer makes a unit test project\n> implementing/using the module to test with TDD workflow. During the\n> progress of the work the modules must be added and committed to RepoWR;\n> the modules are on the working directory of RepoWR (RepoWR\\src) and the\n> test files on a specific subfolder (RepoWR\\TestModuleOne\\src).\n> Is this a viable solution or are there hidden problems and so better\n> solution to implement?\n\nDid I get that right that the test files should not be put in the same\nsubmodule (= directory tree) where the to-be-tested code lives? To me\nit makes more sense when the tests and the code that is tested live in\nthe same submodule.\n"}]}