import errno, os, re, urllib
from ConfigParser import ConfigParser
from optparse import OptionParser
-from fnmatch import fnmatch
+import fnmatch
import git
-VERSION = "0.9.1"
+VERSION = "0.9.2"
# Where we keep data in the repo.
def gsk(g):
ignores = []
with open(os.path.join(g.wd,'.git','info','exclude')) as f:
for line in f:
- if line[0] != '#':
- ignores.append(line.rstrip('\n'))
+ line = line.rstrip('\n')
+ if line and line[0] != '#':
+ ignores.append(re.compile(fnmatch.translate(line)))
paths = FILES.sections()
paths.sort()
ignore = False
for i in ignores:
- if fnmatch(path, i):
+ if i.match(path):
ignore = True
+ break
if ignore:
continue
try: