{"thread":{"id":"7230","subject":"git support for subprojects?","startedAt":"2007-03-13T14:32:18Z","lastAt":"2007-03-14T01:11:51Z","messageCount":3,"participants":["luke.powell@bjservices.com","Shawn O. Pearce","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"36997","messageId":"OFD596829F.8C32CA61-ON8625729D.004F66DC-8625729D.00501D41@BJSERVICES.COM","threadId":"7230","inReplyTo":null,"subject":"git support for subprojects?","fromName":"","fromEmail":"luke.powell@bjservices.com","sentAt":"2007-03-13T14:32:18Z","receivedAt":"2007-03-13T14:32:18Z","isPatch":false,"sender":{"key":"luke.powell@bjservices.com","avatar":null},"body":"Say that I have projects A and B which both depend on another project Z. \nWhenever I update one of those projects, I'd like to also update to the \nlatest version of Z in a subdirectory. Is there that kind of support for \nthese subprojects? If I'm not being clear, I'm talking about the kind of \nsupport that is available in Subversion through svn:externals or something \nanalogous.\n\nAlso, please cc me in any answers since I'm not sure my subscription to \nthe list went through.\n\nThanks,\n\nLuke Powell\nProject Engineer\nBJ Services\n"},{"id":"37004","messageId":"20070313155127.GB18890@spearce.org","threadId":"7230","inReplyTo":"OFD596829F.8C32CA61-ON8625729D.004F66DC-8625729D.00501D41@BJSERVICES.COM","subject":"Re: git support for subprojects?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-03-13T15:51:27Z","receivedAt":"2007-03-13T15:51:27Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Luke.Powell@bjservices.com wrote:\n> Say that I have projects A and B which both depend on another project Z. \n> Whenever I update one of those projects, I'd like to also update to the \n> latest version of Z in a subdirectory. Is there that kind of support for \n> these subprojects? If I'm not being clear, I'm talking about the kind of \n> support that is available in Subversion through svn:externals or something \n> analogous.\n\nIn the Git community the concept of a subproject is more powerful\nthan what you just described.  But we haven't implemented those\nconcepts yet in a released version (however there are prototypes\nfloating around for discussion).  ;-)\n\nIf all you want is an svn:externals type of hack, you can easily\nwrite a wrapper script to cd into the subproject Z and run\n`git pull`, merging in any recent changes from the upstream.\n\nBut we haven't automated that, as our concept of a subproject is\nmuch more sophisticated and doesn't always mean update the subproject\nto the latest version.\n\n-- \nShawn.\n"},{"id":"37040","messageId":"et7hvh$phh$1@sea.gmane.org","threadId":"7230","inReplyTo":"OFD596829F.8C32CA61-ON8625729D.004F66DC-8625729D.00501D41@BJSERVICES.COM","subject":"Re: git support for subprojects?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-14T01:11:51Z","receivedAt":"2007-03-14T01:11:51Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"[Cc: git@vger.kernel.org]\n\nLuke.Powell@bjservices.com wrote:\n\n> Say that I have projects A and B which both depend on another project Z. \n> Whenever I update one of those projects, I'd like to also update to the \n> latest version of Z in a subdirectory. Is there that kind of support for \n> these subprojects? If I'm not being clear, I'm talking about the kind of \n> support that is available in Subversion through svn:externals or something \n> analogous.\n\nGit currently doesn't have submodule (subproject) support, although this\ntopic appears from time to time on git mailing list. There are even two\nprototypes of proper submodule support; link to one of those (heavyweight\none by Martin Waitz) can be found at\n  http://git.or.cz/gitwiki/SubprojectSupport\nThere is also lightweight submodule support proposal, but as author did\nnot put info in above page, and I don't have I think an URL saved...\nIt is I think what you might want.\n\nBut it should be fairly easy to cobble together something analogous\nto broken[*1*] svn:externals with update hook...\n \n> Also, please cc me in any answers since I'm not sure my subscription to \n> the list went through.\n\nhttp://git.or.cz/gitwiki/GitCommunity  \n\n\n[*1*] In short: you really, really want to bind/connect submodule commit\n(submodule version) to supermodule (main module) commit. E.g. you want to\nknow for sure that v2.1.3 of your project pass all the tests and works\nwith v0.2.1 of a submodule.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}