Use GitIgnoreSpec in ts_utils.get_gitignore_spec (#13797)

This commit is contained in:
Avasam
2025-04-07 07:58:57 -04:00
committed by GitHub
parent 2b7019b933
commit 09416d0750
+1 -1
View File
@@ -204,7 +204,7 @@ def allowlists(distribution_name: str) -> list[str]:
@functools.cache
def get_gitignore_spec() -> pathspec.PathSpec:
with open(".gitignore", encoding="UTF-8") as f:
return pathspec.PathSpec.from_lines("gitwildmatch", f.readlines())
return pathspec.GitIgnoreSpec.from_lines(f)
def spec_matches_path(spec: pathspec.PathSpec, path: Path) -> bool: