{"thread":{"id":"28486","subject":"sparse checkout bug?","startedAt":"2011-09-24T19:50:57Z","lastAt":"2011-09-24T20:19:18Z","messageCount":2,"participants":["Jay Soffian","Joshua Jensen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"176136","messageId":"CAG+J_DwRPq69TUMOeqU5O9pv=cHZWEP1VJ1_NRaJv5BSFhF00g@mail.gmail.com","threadId":"28486","inReplyTo":null,"subject":"sparse checkout bug?","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2011-09-24T19:50:57Z","receivedAt":"2011-09-24T19:50:57Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"I wanted to exclude a single massive directory from a checkout (the\nLayoutTests directory from WebKit, which includes 130k files), so I\ntried:\n\n$ git config core.sparsecheckout true\n$ echo '*' > .git/info/sparse-checkout\n$ echo '!LayoutTests' >> .git/info/sparse-checkout\n$ git read-tree -m -u HEAD\n\nBut LayoutTests is not being excluded. I also tried every variation of\nincluding leading/trailing slash and trailing '*'.\n\nSimple repro:\n\ngit init sparse-test && cd sparse-test &&\ntouch foo && mkdir bar && touch bar/baz &&\ngit add foo bar/baz &&\ngit commit -m initial &&\ngit config core.sparsecheckout true &&\necho '*' > .git/info/sparse-checkout &&\necho '!bar' >> .git/info/sparse-checkout &&\ngit read-tree -m -u HEAD &&\nls -1R\nfoo\n\nbar:\nbaz\n\nj.\n"},{"id":"176137","messageId":"4E7E3B46.1040002@workspacewhiz.com","threadId":"28486","inReplyTo":"CAG+J_DwRPq69TUMOeqU5O9pv=cHZWEP1VJ1_NRaJv5BSFhF00g@mail.gmail.com","subject":"Re: sparse checkout bug?","fromName":"Joshua Jensen","fromEmail":"jjensen@workspacewhiz.com","sentAt":"2011-09-24T20:19:18Z","receivedAt":"2011-09-24T20:19:18Z","isPatch":false,"sender":{"key":"jjensen@workspacewhiz.com","avatar":"https://avatars.githubusercontent.com/u/111687?v=4"},"body":"----- Original Message -----\nFrom: Jay Soffian\nDate: 9/24/2011 1:50 PM\n> I wanted to exclude a single massive directory from a checkout (the\n> LayoutTests directory from WebKit, which includes 130k files), so I\n> tried:\n>\n> $ git config core.sparsecheckout true\n> $ echo '*'>  .git/info/sparse-checkout\n> $ echo '!LayoutTests'>>  .git/info/sparse-checkout\n> $ git read-tree -m -u HEAD\n>\n> But LayoutTests is not being excluded. I also tried every variation of\n> including leading/trailing slash and trailing '*'.\n>\nThis bug has very recently been discussed on the mailing list.\n\nAs a workaround, use:\n\n/*\n\ninstead of:\n\n*\n\nYou said you have tried this already, but it works for me.  The only \nthing I do in addition is this:\n\n/*\n!LayoutTests/\n\n-Josh\n"}]}