From 74da98f9c761b2e63366a643fa52749844ddc6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 31 Jul 2010 13:14:29 +0700 Subject: unpack-trees: mark new entries skip-worktree appropriately MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- t/t1011-read-tree-sparse-checkout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh index 85e08374dd..9a07de1a5b 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 && -- cgit v1.2.3