git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
MWMicha 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
 
Next: Duy Nguyen
Message 1 of 2 in “Behavior change in 2.7.0: With core.sparseCheckout some files have the skip-worktree bit set after a checkout.”
  1. Micha WiedenmannJan 8, 2016
  2. Duy NguyenJan 8, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.