From 8c722360d1277259d4baec951e1488086f775214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 8 Jan 2016 19:05:25 +0700 Subject: Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 57534ee77d22e725d971ee89c77dc6aad61c573f. The feature added in that commit requires that patterns behave the same way from anywhere. But some patterns can behave differently depending on current "working" directory. The conditions to catch and avoid these patterns are too loose. The untracked listing[1] and sparse-checkout selection[2] can become incorrect as a result. [1] http://article.gmane.org/gmane.comp.version-control.git/283520 [2] http://article.gmane.org/gmane.comp.version-control.git/283532 Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t3001-ls-files-others-exclude.sh | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 't/t3001-ls-files-others-exclude.sh') diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index 2a13af1758..b2798feef7 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@ -305,29 +305,4 @@ test_expect_success 'ls-files with "**" patterns and no slashes' ' test_cmp expect actual ' -test_expect_success 'negative patterns' ' - git init reinclude && - ( - cd reinclude && - cat >.gitignore <<-\EOF && - /fooo - /foo - !foo/bar/bar - EOF - mkdir fooo && - cat >fooo/.gitignore <<-\EOF && - !/* - EOF - mkdir -p foo/bar && - touch abc foo/def foo/bar/ghi foo/bar/bar && - git ls-files -o --exclude-standard >../actual && - cat >../expected <<-\EOF && - .gitignore - abc - foo/bar/bar - EOF - test_cmp ../expected ../actual - ) -' - test_done -- cgit v1.2.1