threads / bug / 28486

sparse checkout bug?

Subject: sparse checkout bug?

## tl;dr

2 messages between Sep 24, 2011 and Sep 24, 2011.

replies: 1people: 2as markdown or json

Jay Soffian· Sep 24, 2011, 19:50 UTC · lore

I wanted to exclude a single massive directory from a checkout (the LayoutTests directory from WebKit, which includes 130k files), so I tried:

$ git config core.sparsecheckout true $ echo '*' > .git/info/sparse-checkout $ echo '!LayoutTests' >> .git/info/sparse-checkout $ git read-tree -m -u HEAD

But LayoutTests is not being excluded. I also tried every variation of including leading/trailing slash and trailing '*'.

Simple repro:

git init sparse-test && cd sparse-test && touch foo && mkdir bar && touch bar/baz && git add foo bar/baz && git commit -m initial && git config core.sparsecheckout true && echo '*' > .git/info/sparse-checkout && echo '!bar' >> .git/info/sparse-checkout && git read-tree -m -u HEAD && ls -1R foo

bar: baz

j.
Joshua Jensen· Sep 24, 2011, 20:19 UTC · re: Jay Soffian · lore

Re: sparse checkout bug?

----- Original Message -----
From: Jay Soffian
Date: 9/24/2011 1:50 PM
Show 12 quoted lines
> I wanted to exclude a single massive directory from a checkout (the
> LayoutTests directory from WebKit, which includes 130k files), so I
> tried:
>
> $ git config core.sparsecheckout true
> $ echo '*'>  .git/info/sparse-checkout
> $ echo '!LayoutTests'>>  .git/info/sparse-checkout
> $ git read-tree -m -u HEAD
>
> But LayoutTests is not being excluded. I also tried every variation of
> including leading/trailing slash and trailing '*'.
>
This bug has very recently been discussed on the mailing list.
As a workaround, use:
/*
instead of:
*

You said you have tried this already, but it works for me. The only thing I do in addition is this:

/* !LayoutTests/

-Josh

← back to recent threads