threads / discuss / 41147

Behavior change in 2.7.0: With core.sparseCheckout some files have the skip-worktree bit set after a checkout.

Subject: Behavior change in 2.7.0: With core.sparseCheckout some files have the skip-worktree bit set after a checkout.

## tl;dr

2 messages between Jan 8, 2016 and Jan 8, 2016.

replies: 1people: 2as markdown or json

Micha Wiedenmann· Jan 8, 2016, 10:35 UTC · lore
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
 
Duy Nguyen· Jan 8, 2016, 10:49 UTC · re: Micha Wiedenmann · lore

Re: Behavior change in 2.7.0: With core.sparseCheckout some files have the skip-worktree bit set after a checkout.

On Fri, Jan 8, 2016 at 5:35 PM, Micha Wiedenmann <mw-u2@gmx.de> wrote:
> 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.)

I might know the reason (and I'm quickly becoming king of regressions). Checking...

-- 
Duy

← back to recent threads