git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git sparse checkout exclusions not working?
@ 2011-04-27 16:35 skillzero
  2011-04-29 12:10 ` Nguyen Thai Ngoc Duy
  0 siblings, 1 reply; 3+ messages in thread
From: skillzero @ 2011-04-27 16:35 UTC (permalink / raw)
  To: Git Mailing List

It seems like ! patterns in the sparse-checkout file don't exclude
individual files in a directory. Here's what I did:

git init
mkdir test1
echo "test1" test1/file1.txt
echo "test2" test1/file2.txt
echo "test3" test1/file3.txt
mkdir test2
echo "test2" test2/file1.txt
echo "test2" test2/file2.txt
echo "test2" test2/file3.txt
git add .
git commit -m "test"
git config core.sparseCheckout true

echo 'test1/' > .git/info/sparse-checkout
echo '!test1/file2.txt' >> .git/info/sparse-checkout
git checkout master --

The end result is like this:

test1
test1/file1.txt
test1/file2.txt
test1/file3.txt

The "test1" directory was included, but "test1/file2.txt" wasn't
excluded even though I added a ! pattern for it. The test2 directory
was correctly excluded so that makes me think sparse was working in
general, but just not respecting the ! pattern in this case.

Is this a bug or am I doing something wrong?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-30 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 16:35 git sparse checkout exclusions not working? skillzero
2011-04-29 12:10 ` Nguyen Thai Ngoc Duy
2011-04-30 10:06   ` Nguyen Thai Ngoc Duy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).