From aec58ac4991e3252cdf3f3c08d4a14075d03d979 Mon Sep 17 00:00:00 2001 From: Adam Waldenberg Date: Sun, 30 Jun 2013 23:58:49 +0200 Subject: [PATCH] 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. --- gitinspector/filtering.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitinspector/filtering.py b/gitinspector/filtering.py index b7b8a02..1d8a104 100644 --- a/gitinspector/filtering.py +++ b/gitinspector/filtering.py @@ -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