Reputation: 10193
I'm testing out the Git sparse checkout functionality, using the manual and this page as a guide. I tried checking out a directory by creating a sparse-checkout file with following contents (actual names hidden of course):
dir1/
Then I run git read-tree -mu
and afterwards I see dir1
in my repository as expected. Next I decide to checkout a new directory so I update the contents of the sparse-checkout file again to look like this:
dir1/
dir2/
Then I run git read-tree -mu
and afterwards I see the following non-nested directories:
dir1
dir2
dir3
dir4
Why are the extra directories appearing? Is it a bug in Git? Note that if I remove dir2/
from the sparse-checkout file they all seem to disappear as a group as well.
Upvotes: 1
Views: 125
Reputation: 10193
due to missing slash at start of dir: "dir2" should have read "/dir2"
Upvotes: 1