You need to use absolute pathnames in the sparse-checkout file.
Also, have a look at this thread:
https://stackoverflow.com/questions/411 ... repositoryversions of git newer that 2.25.0 have a "sparse-checkout" command that makes it easier to work with sparse checkouts.
Edit: OK - having checked out that latter thread, here is the sequence of events you need:
Code:
git clone --no-checkout --depth 1 git://github.com/llvm/llvm-project.git
cd llvm-project
git config core.sparsecheckout true
echo "libcxx/*" > .git/info/sparse-checkout
echo "libcxxabi/*" >> .git/info/sparse-checkout
git checkout
This is tested, and working, on Linux. I believe that on Windows you need to omit the quotes in the echo commands, but I haven't tested this.