mirror of https://github.com/python/cpython
gh-122044: Don't error during gitignore filtering with no files (#122045)
This commit is contained in:
parent
7a6d4ccf0e
commit
4e04d1a3d2
|
@ -108,6 +108,10 @@ def filter_gitignored_paths(paths: list[str]) -> list[str]:
|
||||||
|
|
||||||
'.gitignore:9:*.a Tools/lib.a'
|
'.gitignore:9:*.a Tools/lib.a'
|
||||||
"""
|
"""
|
||||||
|
# No paths means no filtering to be done.
|
||||||
|
if not paths:
|
||||||
|
return []
|
||||||
|
|
||||||
# Filter out files in gitignore.
|
# Filter out files in gitignore.
|
||||||
# Non-matching files show up as '::<whitespace><path>'
|
# Non-matching files show up as '::<whitespace><path>'
|
||||||
git_check_ignore_proc = subprocess.run(
|
git_check_ignore_proc = subprocess.run(
|
||||||
|
|
Loading…
Reference in New Issue