Behavior change in 2.7.0: With core.sparseCheckout some files have the skip-worktree bit set after a checkout.
- From
- Micha Wiedenmann <mw-u2@gmx.de>
- Date
- Jan 8, 2016, 10:35 UTC
- Message-ID
- <trinity-5caa2985-5cf1-453b-9a9e-bcce057f8615-1452249323061@3capp-gmx-bs51>
Hi, I want to report a change in behavior Git 2.7.0. With `core.sparseCheckout` set to true, `git checkout` results in some files with a set skip-worktree bit, which was not the case in 2.6.4. (I am using Git for Windows, but assume this is a Git issue, which is why I report it to this list.) Please see my test case: #!/bin/bash git --version # git version 2.7.0.windows.1 mkdir test-case cd test-case git init mkdir keep echo keep > keep/keep.txt echo foo > foo.txt git add -A git commit -m initial git config core.sparseCheckout true cat > .git/info/sparse-checkout <<EOF /* !/keep/tags/ EOF
git checkout git ls-files -v # H foo.txt # S keep/keep.txt # $ git --version
# git version 2.6.4.windows.1 # $ git checkout # $ git ls-files -v # # H foo.txt # # H keep/keep.txt # (Note that the result of keep/keep.txt is different)
git read-tree @ git ls-files -v # H foo.txt # H keep/keep.txt
I noticed this, when all my tracked files where suddenly missing from the working directory.
Hope that helps, Micha Wiedenmann