{"thread":{"id":"43443","subject":"Re: multiple branches or multiple repositories","startedAt":"2006-11-03T01:51:30Z","lastAt":"2006-11-03T16:01:16Z","messageCount":4,"participants":["Junio C Hamano","Linus Torvalds","Jeff King","Han-Wen Nienhuys"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"297837","messageId":"eie7ae$ib6$1@sea.gmane.org","threadId":"43443","inReplyTo":null,"subject":"multiple branches or multiple repositories","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-11-03T01:51:30Z","receivedAt":"2006-11-03T01:51:30Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"\nWe're in the process of converting the LilyPond CVS repository at \nsavannah.gnu.org to GIT.  One of the questions we need to deal with, is \nhow handle modules.\n\nThere seem to be two approaches:\n\n  - for each module, create a separate git repository.  Inside the \nrepository, each subproject has its own branching\n\n  - put each module as a separate branch in a shared repository.\n\nI think the first option is the most natural one, but are there any \nissues, besides namespace pollution to the second option?\n\n-- \n  Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"},{"id":"294804","messageId":"7vlkmtmf06.fsf@assigned-by-dhcp.cox.net","threadId":"43443","inReplyTo":"eie7ae$ib6$1@sea.gmane.org","subject":"Re: multiple branches or multiple repositories","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-03T02:38:01Z","receivedAt":"2006-11-03T02:38:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Han-Wen Nienhuys <hanwen@xs4all.nl> writes:\n\n> We're in the process of converting the LilyPond CVS repository at\n> savannah.gnu.org to GIT.  One of the questions we need to deal with,\n> is how handle modules.\n>\n> There seem to be two approaches:\n>\n>  - for each module, create a separate git repository.  Inside the\n> repository, each subproject has its own branching\n>\n>  - put each module as a separate branch in a shared repository.\n>\n> I think the first option is the most natural one, but are there any\n> issues, besides namespace pollution to the second option?\n\nAs the layout for a distribution point, the second one may be\neasier to handle (one place to remotely sync with), but in all\nother aspects the first option should be easier to deal with\nday-to-day.\n\n"},{"id":"296526","messageId":"Pine.LNX.4.64.0611022301380.25218@g5.osdl.org","threadId":"43443","inReplyTo":"eie7ae$ib6$1@sea.gmane.org","subject":"Re: multiple branches or multiple repositories","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-11-03T07:11:53Z","receivedAt":"2006-11-03T07:11:53Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 3 Nov 2006, Han-Wen Nienhuys wrote:\n> \n> We're in the process of converting the LilyPond CVS repository at\n> savannah.gnu.org to GIT.  One of the questions we need to deal with, is how\n> handle modules.\n> \n> There seem to be two approaches:\n> \n>  - for each module, create a separate git repository.  Inside the repository,\n>    each subproject has its own branching\n> \n>  - put each module as a separate branch in a shared repository.\n> \n> I think the first option is the most natural one, but are there any issues,\n> besides namespace pollution to the second option?\n\nThere are no real issues either way, and perhaps more importantly, it's \nnot even something you have to decide on day one.\n\nYou can easily do it one way or the other, and either\n - switch around as needed\n - or even _mix_ the two approaches where it makes sense.\n\nFor example, it may be entirely sensible to have the common \"distribution \npoints\" use a single shared repository that contains all modules as \nseparate branches within the same repository.\n\nBut even though such a central distribution point repository is set up \nthat way, individual developers may well decide that they are happier \nhaving separate repositories for different modules. The two approaches are \nnot mutually incompatible, and you can fetch data and push it back out \nbetween both different kinds of repositories.\n\nThe namespace pollution - especially of tags - is indeed likely to be the \nworst issue. If you expect to have many independent modules in the same \nrepository, you obviously shouldn't use tag-names like the Linux kernel \nuses (ie \"v2.6.18\"), since those would not be unambiguous in such a shared \nrepo. \n\n(The same is true of branches too, but perhaps less so if only because \npeople are _already_ using different branch names between different \nrepositories, and we have good support for translating a local branch \nname \"X\" into a remote branch name \"Y\" when transferring data between the \ntwo. In contrast, tagnames are kind of expected to be \"shared\")\n\nBut if you're ok with always just naming tags \"modulename/release-1.2.3\" \nor similar, you shouldn't really have any issues either way. And most \nimportantly, if you do decide to go one way, and then later figure out \nthat it would have been easier the other way, you can just switch between \nthe two models, exactly because mixing them isn't really a problem.\n\n"},{"id":"296559","messageId":"20061103160115.GA27895@coredump.intra.peff.net","threadId":"43443","inReplyTo":"eie7ae$ib6$1@sea.gmane.org","subject":"Re: multiple branches or multiple repositories","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2006-11-03T16:01:16Z","receivedAt":"2006-11-03T16:01:16Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 03, 2006 at 02:51:30AM +0100, Han-Wen Nienhuys wrote:\n\n>  - for each module, create a separate git repository.  Inside the \n> repository, each subproject has its own branching\n> \n>  - put each module as a separate branch in a shared repository.\n> \n> I think the first option is the most natural one, but are there any \n> issues, besides namespace pollution to the second option?\n\nI don't believe there is currently an option to git-clone to grab only a\nsingle branch, so cloners in the second case would end up having to get\n_all_ modules (though such an option would probably not be hard to\nimplement).\n\nThe plus side is that a single 'fetch' would grab updates for all\nmodules (with only a single connection to the server).\n\n"}]}