File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,10 @@ class GitDataCollector(DataCollector):
477
477
except ValueError :
478
478
print 'Warning: failed to parse line "%s"' % line
479
479
480
+
481
+ # compile exclude_paths regex
482
+ conf ['exclude_paths' ] = [re .compile (pattern , re .IGNORECASE ) for pattern in conf ['exclude_paths' ]]
483
+
480
484
# extensions and size of files
481
485
lines = getpipeoutput (['git ls-tree -r -l -z %s' % getcommitrange ('HEAD' , end_only = True )]).split ('\000 ' )
482
486
blobs_to_read = []
@@ -492,11 +496,12 @@ class GitDataCollector(DataCollector):
492
496
fullpath = parts [4 ]
493
497
494
498
exclude = False
495
- for path in conf ['exclude_paths' ]:
496
- if path in fullpath :
499
+ for pattern in conf ['exclude_paths' ]:
500
+ if pattern . search ( fullpath ) :
497
501
exclude = True
498
502
break
499
503
if exclude :
504
+ print 'Excluding file: %s' % fullpath
500
505
continue
501
506
502
507
self .total_size += size
You can’t perform that action at this time.
0 commit comments