Skip to content

Commit

Permalink
Exclude .git directories and files in them by default
Browse files Browse the repository at this point in the history
Note that this makes a list of all files in .git directories and is
thus very slow.
  • Loading branch information
brechtm committed Jan 21, 2021
1 parent 77a4610 commit 75aa91d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion poetry/core/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,10 @@ def get_ignored_files(self, folder=None): # type: (...) -> list

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

return output.strip().split("\n")
return dotgit + output.strip().split("\n")

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

0 comments on commit 75aa91d

Please sign in to comment.