8000 [3.13] gh-122044: Don't error during gitignore filtering with no file… · python/cpython@e122d2a · GitHub
[go: up one dir, main page]

Skip to content

Commit e122d2a

Browse files
[3.13] gh-122044: Don't error during gitignore filtering with no files (GH-122045) (#122355)
Co-authored-by: Seth Michael Larson <seth@python.org>
1 parent 6496ffa commit e122d2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tools/build/generate_sbom.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ def filter_gitignored_paths(paths: list[str]) -> list[str]:
108108
109109
'.gitignore:9:*.a Tools/lib.a'
110110
"""
111+
# No paths means no filtering to be done.
112+
if not paths:
113+
return []
114+
111115
# Filter out files in gitignore.
112116
# Non-matching files show up as '::<whitespace><path>'
113117
git_check_ignore_proc = subprocess.run(

0 commit comments

Comments
 (0)
0