Skip to content

Commit 75aa91d

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 75aa91d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

poetry/core/vcs/git.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,10 @@ 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))
260+
for path in folder.rglob('.git/*'))
259261

260-
return output.strip().split("\n")
262+
return dotgit + output.strip().split("\n")
261263

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

0 commit comments

Comments
 (0)