Skip to content

Commit b41f4cc

Browse files
committed
Merge branch 'chris-dudley-updateignore-handle-comments-whitespace' into python3
2 parents 9d26670 + 1dde825 commit b41f4cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

git.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,9 @@ def run(self, edit):
489489
folder["file_exclude_patterns"] = []
490490
for pattern in gitignore_file:
491491
pattern = pattern.strip()
492-
if os.path.isdir(os.path.join(path, pattern)):
492+
if len(pattern) == 0 or pattern[0] == '#':
493+
continue
494+
elif os.path.isdir(os.path.join(path, pattern)):
493495
if pattern not in folder["folder_exclude_patterns"]:
494496
folder["folder_exclude_patterns"].append(pattern)
495497
else:

0 commit comments

Comments
 (0)