Skip to content

Commit 6585468

Browse files
committed
Exclude .git directories and files in them by default
Note that this makes a list of all files in .git directories and is thus very slow.
1 parent 77a4610 commit 6585468

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

poetry/core/vcs/git.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,9 @@ def get_ignored_files(self, folder=None): # type: (...) -> list
256256

257257
args += ["ls-files", "--others", "-i", "--exclude-standard"]
258258
output = self.run(*args)
259+
dotgit = list(str(path.relative_to(folder)) for path in folder.rglob(".git/*"))
259260

260-
return output.strip().split("\n")
261+
return dotgit + output.strip().split("\n")
261262

262263
def remote_urls(self, folder=None): # type: (...) -> dict
263264
output = self.run(

0 commit comments

Comments
 (0)