Filtering and the -x/--exclude option now support regular expressions.

Thanks to this change; we can support the --exclude option in conjunction
with git-config.
This commit is contained in:
Adam Waldenberg 2013-06-30 23:58:49 +02:00
parent 8bd761f872
commit aec58ac499

View file

@ -20,6 +20,7 @@
from __future__ import print_function
from __future__ import unicode_literals
from outputable import Outputable
import re
import terminal
import textwrap
@ -40,7 +41,7 @@ def set_filtered(file_name):
if len(string) > 0:
for i in __filters__:
if string.find(i) != -1:
if re.search(i, string) != None:
__filtered_files__.add(string)
return True
return False