summaryrefslogtreecommitdiff
path: root/t/t1011-read-tree-sparse-checkout.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-07-31 06:14:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-09 19:16:02 (GMT)
commit74da98f9c761b2e63366a643fa52749844ddc6a1 (patch)
tree41d872160ae1685c296973a6825a4636bb3b90c3 /t/t1011-read-tree-sparse-checkout.sh
parent711f151a7b56f450e3a17b734e84f71bb57522c6 (diff)
downloadgit-74da98f9c761b2e63366a643fa52749844ddc6a1.zip
git-74da98f9c761b2e63366a643fa52749844ddc6a1.tar.gz
git-74da98f9c761b2e63366a643fa52749844ddc6a1.tar.bz2
unpack-trees: mark new entries skip-worktree appropriately
Sparse checkout narrows worktree down based on the skip-worktree bit before and after $GIT_DIR/info/sparse-checkout application. If it does not have that bit before but does after, a narrow is detected and the file will be removed from worktree. New files added by merge, however, does not have skip-worktree bit. If those files appear to be outside checkout area, the same rule applies: the file gets removed from worktree even though they don't exist in worktree. Just pretend they have skip-worktree before in that case, so the rule is ignored. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1011-read-tree-sparse-checkout.sh')
-rwxr-xr-xt/t1011-read-tree-sparse-checkout.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh
index 85e0837..9a07de1 100755
--- a/t/t1011-read-tree-sparse-checkout.sh
+++ b/t/t1011-read-tree-sparse-checkout.sh
@@ -146,7 +146,7 @@ test_expect_success 'read-tree adds to worktree, absent case' '
test ! -f sub/added
'
-test_expect_failure 'read-tree adds to worktree, dirty case' '
+test_expect_success 'read-tree adds to worktree, dirty case' '
echo init.t >.git/info/sparse-checkout &&
git checkout -f removed &&
mkdir sub &&