Skip to content

Commit 9fb2edb

Browse files
authored
Merge pull request #16 from trailofbits/list-untracked
list untracked files in addition to tracked files
2 parents cdbcc95 + 1e3e207 commit 9fb2edb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vendetect/repo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ def git_files(self) -> Iterator["File"]:
183183
if GIT_PATH is None:
184184
msg = "`git` binary could not be found"
185185
raise RepositoryError(msg)
186-
for line in subprocess.check_output([GIT_PATH, "ls-files"], cwd=self.path).splitlines(): # noqa: S603
186+
for line in subprocess.check_output( # noqa: S603
187+
[GIT_PATH, "ls-files", "--cached", "--others", "--exclude-standard"], cwd=self.path
188+
).splitlines():
187189
line = line.strip() # noqa: PLW2901
188190
if line:
189191
path = Path(line.decode("utf-8"))

0 commit comments

Comments
 (0)