{"thread":{"id":"35231","subject":"Limiting disk usage","startedAt":"2013-10-29T06:22:51Z","lastAt":"2013-10-30T15:40:11Z","messageCount":7,"participants":["Piotr Krukowiecki","Matthieu Moy","Jakub Narębski","Fredrik Gustafsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"229699","messageId":"0a4899b7-f75f-4016-9c99-5e6e3fb9603c@email.android.com","threadId":"35231","inReplyTo":null,"subject":"Limiting disk usage","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2013-10-29T06:22:51Z","receivedAt":"2013-10-29T06:22:51Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"Hi, \n\nWhat can be done to limit amount of space occupied on clone and checkout? I know about shallow clone and sparse checkout, anything else? \n\nPreferably I would split repository into multiple repositories but I worry that working with multiple directories would be much more troublesome. But maybe I am wrong? I don't have much experience with submodules, repo tool (what else?)\n\nThanks \n-- \nPiotr Krukowiecki \n"},{"id":"229711","messageId":"vpqob68ebcu.fsf@anie.imag.fr","threadId":"35231","inReplyTo":"0a4899b7-f75f-4016-9c99-5e6e3fb9603c@email.android.com","subject":"Re: Limiting disk usage","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-10-29T08:21:21Z","receivedAt":"2013-10-29T08:21:21Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Piotr Krukowiecki <piotr.krukowiecki@gmail.com> writes:\n\n> Hi, \n>\n> What can be done to limit amount of space occupied on clone and\n> checkout? I know about shallow clone and sparse checkout, anything\n> else?\n\nSorry if I'm stating the obvious, but \"git gc\" is a good start. If you\ndid something wrong with your repo before, maybe \"git gc --aggressive\"\ncan help.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"229722","messageId":"CAA01Cso+yTzatiAaQahx5h2N0nnOON7FsnWNSYrN-pV=8qzn7g@mail.gmail.com","threadId":"35231","inReplyTo":"vpqob68ebcu.fsf@anie.imag.fr","subject":"Re: Limiting disk usage","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2013-10-29T13:50:32Z","receivedAt":"2013-10-29T13:50:32Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"[resending as sent previous version as HTML, sorry about that]\n\nOn Tue, Oct 29, 2013 at 9:21 AM, Matthieu Moy\n<Matthieu.Moy@grenoble-inp.fr> wrote:\n>\n> Piotr Krukowiecki <piotr.krukowiecki@gmail.com> writes:\n>\n> > Hi,\n> >\n> > What can be done to limit amount of space occupied on clone and\n> > checkout? I know about shallow clone and sparse checkout, anything\n> > else?\n>\n> Sorry if I'm stating the obvious, but \"git gc\" is a good start. If you\n> did something wrong with your repo before, maybe \"git gc --aggressive\"\n> can help.\n\nYes, I put a lot of code into the repository. I know it is wrong from git POV ;)\nThat's why I wrote about splitting repository into multiple smaller\nrepositories, but AFAIK git is not very good at managing that too...\n\n(Background: we're thinking about migrating svn repository into git.\nCurrently there is one svn repository containing many related\ndirectories. They are branched/merged/tagged together. Often work is\ndone on all/many of them, but there are some use cases where we need\nonly some of them)\n\n\n-- \nPiotr Krukowiecki\n"},{"id":"229728","messageId":"526FCA13.4090902@gmail.com","threadId":"35231","inReplyTo":"CAA01Cso+yTzatiAaQahx5h2N0nnOON7FsnWNSYrN-pV=8qzn7g@mail.gmail.com","subject":"Re: Limiting disk usage","fromName":"Jakub Narębski","fromEmail":"jnareb@gmail.com","sentAt":"2013-10-29T14:45:39Z","receivedAt":"2013-10-29T14:45:39Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On 2013-10-29 14:50, Piotr Krukowiecki wrote:\n\n> Yes, I put a lot of code into the repository. I know it is wrong from git POV ;)\n> That's why I wrote about splitting repository into multiple smaller\n> repositories, but AFAIK git is not very good at managing that too...\n\nLot of code isn't problem, see Linux kernel or GCC, or LibreOffice.org\n\n> (Background: we're thinking about migrating svn repository into git.\n> Currently there is one svn repository containing many related\n> directories. They are branched/merged/tagged together. Often work is\n> done on all/many of them, but there are some use cases where we need\n> only some of them)\n\nIf they are independent projects, they should get independent repositories;\nyou can stitch them back together using git-submodule (or git-subtree).\nreposurgeon can hel you with that.\n\n-- \nJakub Narębski\n"},{"id":"229792","messageId":"CAA01Cso8J+BBgskoRtxkPRrtM4KJ1O2FhcB4uh+QB2Dr=DZGyQ@mail.gmail.com","threadId":"35231","inReplyTo":"526FCA13.4090902@gmail.com","subject":"Re: Limiting disk usage","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2013-10-30T07:44:49Z","receivedAt":"2013-10-30T07:44:49Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Tue, Oct 29, 2013 at 3:45 PM, Jakub Narębski <jnareb@gmail.com> wrote:\n> On 2013-10-29 14:50, Piotr Krukowiecki wrote:\n>>\n> Lot of code isn't problem, see Linux kernel or GCC, or LibreOffice.org\n\nOK, it depends on how much code is too much for you. I'm not talking\nabout performance of git, just disk usage. In my case I have too much\ncode.\n\n\n> If they are independent projects, they should get independent repositories;\n> you can stitch them back together using git-submodule (or git-subtree).\n> reposurgeon can hel you with that.\n\nThey are not totally independent projects (nor totally dependent).\nNormally you want them all, you want to create a branch/tag on all of\nthem, if new directory is created you want to automatically have it\ntoo etc. But there are use cases when you need only some of them and\nthen they can be seen as independent .\n\ngit-submodule have several disadvantages for my use:\n- does not track branches (you have to specify hardcoded SHA1 instead\nof a branch name)\n- additional complexity / command layer (you have to do things like\n\"submodule init\", \"submodule update\")\n- you can't simply work on all submodules (you can't simply branch,\nmerge, commit, log, diff, etc in all submodules using one command in\ntop-level project)\n\ngit-subtree looks much better in that regard, but for example it needs\nan explicit prefix (name of \"subproject\") on which it operates. So you\ncan't say \"update everything\" or \"commit everything\" etc. With\nhundreds of subprojects you need another layer to automate this...\n\n-- \nPiotr Krukowiecki\n"},{"id":"229819","messageId":"52712816.9010600@gmail.com","threadId":"35231","inReplyTo":"CAA01Cso8J+BBgskoRtxkPRrtM4KJ1O2FhcB4uh+QB2Dr=DZGyQ@mail.gmail.com","subject":"Re: Limiting disk usage","fromName":"Jakub Narębski","fromEmail":"jnareb@gmail.com","sentAt":"2013-10-30T15:39:02Z","receivedAt":"2013-10-30T15:39:02Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On 2013-10-30 08:44, Piotr Krukowiecki wrote:\n> On Tue, Oct 29, 2013 at 3:45 PM, Jakub Narębski<jnareb@gmail.com>  wrote:\n>> On 2013-10-29 14:50, Piotr Krukowiecki wrote:\n\n>> If they are independent projects, they should get independent repositories;\n>> you can stitch them back together using git-submodule (or git-subtree).\n>> reposurgeon can hel you with that.\n>\n> They are not totally independent projects (nor totally dependent).\n> Normally you want them all, you want to create a branch/tag on all of\n> them, if new directory is created you want to automatically have it\n> too etc. But there are use cases when you need only some of them and\n> then they can be seen as independent .\n>\n> git-submodule have several disadvantages for my use:\n> - does not track branches (you have to specify hardcoded SHA1 instead\n> of a branch name)\n> - additional complexity / command layer (you have to do things like\n> \"submodule init\", \"submodule update\")\n> - you can't simply work on all submodules (you can't simply branch,\n> merge, commit, log, diff, etc in all submodules using one command in\n> top-level project)\n\ngit-submodule was created (I think) to manage loosely coupled fairly\nindependent projects, where you need nevertheless to ensure that\nboth work together (so you use specific version of subproject for\na given version of superproject).  It looks like this is not what\nyou have.\n\n From time to time you can find there ideas about adding \"floating\"\nmode to git-submodule, but as far as I know up till now without\neffect...\n\n> git-subtree looks much better in that regard, but for example it needs\n> an explicit prefix (name of \"subproject\") on which it operates. So you\n> can't say \"update everything\" or \"commit everything\" etc. With\n> hundreds of subprojects you need another layer to automate this...\n\ngit-subtree is about helping merging / embedding (or re-embedding)\nof subproject history in superproject history, and extracting subproject \nhistory from superproject history.  But embedded subproject is just \nsubdirectory to git.  It looks like it isn't what you want.\n\nThere are many projects[1] that try to solve problem of managing \ninterdependent repositories, e.g.: gitslave, repo, fgit.  Maybe one\nof them would be good fit for your problem.\n\n[1]: https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools\n\n-- \nJakub Narębski\n"},{"id":"229820","messageId":"20131030154011.GB9691@paksenarrion.iveqy.com","threadId":"35231","inReplyTo":"52712816.9010600@gmail.com","subject":"Re: Limiting disk usage","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2013-10-30T15:40:11Z","receivedAt":"2013-10-30T15:40:11Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Wed, Oct 30, 2013 at 04:39:02PM +0100, Jakub Narębski wrote:\n> From time to time you can find there ideas about adding \"floating\"\n> mode to git-submodule, but as far as I know up till now without\n> effect...\n\nHow about git submodule update --remote ?\n\n-- \nMed vänliga hälsningar\nFredrik Gustafsson\n\ntel: 0733-608274\ne-post: iveqy@iveqy.com\n"}]}