equal
deleted
inserted
replaced
31 def readpatternfile(orig, filepath, warn, sourceinfo=False): |
31 def readpatternfile(orig, filepath, warn, sourceinfo=False): |
32 if not (b'info/exclude' in filepath or filepath.endswith(b'.gitignore')): |
32 if not (b'info/exclude' in filepath or filepath.endswith(b'.gitignore')): |
33 return orig(filepath, warn, sourceinfo=False) |
33 return orig(filepath, warn, sourceinfo=False) |
34 result = [] |
34 result = [] |
35 warnings = [] |
35 warnings = [] |
36 with open(filepath, b'rb') as fp: |
36 with open(filepath, 'rb') as fp: |
37 for l in fp: |
37 for l in fp: |
38 l = l.strip() |
38 l = l.strip() |
39 if not l or l.startswith(b'#'): |
39 if not l or l.startswith(b'#'): |
40 continue |
40 continue |
41 if l.startswith(b'!'): |
41 if l.startswith(b'!'): |