{"thread":{"id":"34682","subject":"Help with sparse checkouts","startedAt":"2013-08-12T18:27:51Z","lastAt":"2013-08-13T06:07:39Z","messageCount":2,"participants":["Ari Entlich","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"225121","messageId":"6658365.507831376332071042.JavaMail.root@zimbra","threadId":"34682","inReplyTo":"7159505.507781376331946615.JavaMail.root@zimbra","subject":"Help with sparse checkouts","fromName":"Ari Entlich","fromEmail":"atrigent@ccs.neu.edu","sentAt":"2013-08-12T18:27:51Z","receivedAt":"2013-08-12T18:27:51Z","isPatch":false,"sender":{"key":"atrigent@ccs.neu.edu","avatar":null},"body":"Hello all!\n\nAt my current workplace, I have a git-svn repository which has an extremely large working directory. I did not use the --stdlayout option in this clone, so I have a number of branches in my working directory which duplicate large amounts of trunk. There is a particularly large subdirectory which has now been copied to branches four times (and hence shows up in my working directory 5 times). This directory and its copies are making up the vast majority of the files and storage space in my working directory. Furthermore, I do not need or want to have access to the data in these particular directories. Hence, I would like to use the sparse checkouts feature to exclude them from my working directory.\n\nLet's say that these directories are all called \"thedir\". What I would like to do with the sparse checkouts feature is to simply ignore directories with this name anywhere in the working tree. Intuitively, it seems like I should be able to put:\n\n!thedir\n\nor possibly\n\n!thedir/\n\nin the sparse-checkout file, but these don't seem to work. I've tried a number of other things, but I always seem to either get the \"sparse checkout leaves no entry on working directory\" error or no effect at all. In the end, I basically just don't really understand how this file is supposed to work, so I'd rather get some expert help here rather than thrashing about randomly. I realize that sparse checkouts is usually used to select a specific directory rather than what I'm trying to do, so I accept that what I want may simply not be possible with the current implementation. I've asked on IRC, but I wanted to ask here also since it seemed that most of the people I talked to weren't that familiar with the sparse checkouts feature.\n\nNote that, while using --stdlayout would mitigate the massive working directory somewhat, I would still probably want to exclude this directory from my worktree. I will probably do a reclone at some point and use --stdlayout, but I will still want to exclude this particular directory even at that point. I had a lot of people on IRC telling me to just use --stdlayout, which was a good suggestion, but didn't fully fulfill my needs.\n\nThanks!\n\nAri\n"},{"id":"225131","messageId":"CACsJy8B8T=DvR4DcXgjvqTX2HvUGDY140JtiQdrv=JwRt_DCrQ@mail.gmail.com","threadId":"34682","inReplyTo":"6658365.507831376332071042.JavaMail.root@zimbra","subject":"Re: Help with sparse checkouts","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2013-08-13T06:07:39Z","receivedAt":"2013-08-13T06:07:39Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Aug 13, 2013 at 1:27 AM, Ari Entlich <atrigent@ccs.neu.edu> wrote:\n> Hello all!\n>\n> At my current workplace, I have a git-svn repository which has an extremely large working directory. I did not use the --stdlayout option in this clone, so I have a number of branches in my working directory which duplicate large amounts of trunk. There is a particularly large subdirectory which has now been copied to branches four times (and hence shows up in my working directory 5 times). This directory and its copies are making up the vast majority of the files and storage space in my working directory. Furthermore, I do not need or want to have access to the data in these particular directories. Hence, I would like to use the sparse checkouts feature to exclude them from my working directory.\n>\n> Let's say that these directories are all called \"thedir\". What I would like to do with the sparse checkouts feature is to simply ignore directories with this name anywhere in the working tree. Intuitively, it seems like I should be able to put:\n>\n> !thedir\n>\n> or possibly\n>\n> !thedir/\n>\n\nI think this should work (but I haven't tested it)\n\n/\n!thedir\n\nThe first rule is to include all, the we exclude what we don't want\nusing the second one (trailing slash or not is ok).\n\n> in the sparse-checkout file, but these don't seem to work. I've tried a number of other things, but I always seem to either get the \"sparse checkout leaves no entry on working directory\" error or no effect at all. In the end, I basically just don't really understand how this file is supposed to work, so I'd rather get some expert help here rather than thrashing about randomly. I realize that sparse checkouts is usually used to select a specific directory rather than what I'm trying to do, so I accept that what I want may simply not be possible with the current implementation. I've asked on IRC, but I wanted to ask here also since it seemed that most of the people I talked to weren't that familiar with the sparse checkouts feature.\n>\n> Note that, while using --stdlayout would mitigate the massive working directory somewhat, I would still probably want to exclude this directory from my worktree. I will probably do a reclone at some point and use --stdlayout, but I will still want to exclude this particular directory even at that point. I had a lot of people on IRC telling me to just use --stdlayout, which was a good suggestion, but didn't fully fulfill my needs.\n>\n> Thanks!\n>\n> Ari\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n\n\n-- \nDuy\n"}]}