File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,7 @@ class TabIssueTracker(LineIssueTracker):
321
321
".make" ,
322
322
".pem" , # some openssl dumps have tabs
323
323
".sln" ,
324
+ "/.gitmodules" ,
324
325
"/Makefile" ,
325
326
"/Makefile.inc" ,
326
327
"/generate_visualc_files.pl" ,
@@ -481,6 +482,12 @@ def collect_files():
481
482
bytes_output = subprocess .check_output (['git' , 'ls-files' , '-z' ])
482
483
bytes_filepaths = bytes_output .split (b'\0 ' )[:- 1 ]
483
484
ascii_filepaths = map (lambda fp : fp .decode ('ascii' ), bytes_filepaths )
485
+ # Filter out directories. Normally Git doesn't list directories
486
+ # (it only knows about the files inside them), but there is
487
+ # at least one case where 'git ls-files' includes a directory:
488
+ # submodules. Just skip submodules (and any other directories).
489
+ ascii_filepaths = [fp for fp in ascii_filepaths
490
+ if os .path .isfile (fp )]
484
491
# Prepend './' to files in the top-level directory so that
485
492
# something like `'/Makefile' in fp` matches in the top-level
486
493
# directory as well as in subdirectories.
You can’t perform that action at this time.
0 commit comments