mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
Added support for extensionless files (Fixes #60).
This can be enabled by passing a "*" to the list of defined file types (-f). Originally, the plan was to also implement support for regular expressions. However, this was skipped, as it complicated how expressions for the file types flag were being passed on the command line.
This commit is contained in:
parent
583b5fa753
commit
e3f741b518
2 changed files with 6 additions and 3 deletions
|
@ -31,6 +31,7 @@ import interval
|
|||
import json
|
||||
import multiprocessing
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import terminal
|
||||
import textwrap
|
||||
|
@ -70,7 +71,7 @@ class FileDiff:
|
|||
extension = FileDiff.get_extension(string)
|
||||
|
||||
for i in extensions.get():
|
||||
if extension == i:
|
||||
if (extension == "" and i == "*") or extension == i:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# coding: utf-8
|
||||
#
|
||||
# Copyright © 2012-2014 Ejwa Software. All rights reserved.
|
||||
# Copyright © 2012-2015 Ejwa Software. All rights reserved.
|
||||
#
|
||||
# This file is part of gitinspector.
|
||||
#
|
||||
|
@ -37,7 +37,9 @@ def define(string):
|
|||
__extensions__ = string.split(",")
|
||||
|
||||
def add_located(string):
|
||||
if len(string) > 0:
|
||||
if len(string) == 0:
|
||||
__located_extensions__.add("*")
|
||||
else:
|
||||
__located_extensions__.add(string)
|
||||
|
||||
EXTENSIONS_INFO_TEXT = N_("The extensions below were found in the repository history")
|
||||
|
|
Loading…
Reference in a new issue