git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: skillzero@gmail.com
To: Git Mailing List <git@vger.kernel.org>
Subject: git sparse checkout exclusions not working?
Date: Wed, 27 Apr 2011 09:35:07 -0700	[thread overview]
Message-ID: <BANLkTinPg_jaxiF8yFtnf4BrT4fx-BQ=+A@mail.gmail.com> (raw)

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?

             reply	other threads:[~2011-04-27 16:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 16:35 skillzero [this message]
2011-04-29 12:10 ` git sparse checkout exclusions not working? Nguyen Thai Ngoc Duy
2011-04-30 10:06   ` Nguyen Thai Ngoc Duy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTinPg_jaxiF8yFtnf4BrT4fx-BQ=+A@mail.gmail.com' \
    --to=skillzero@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).