git: add a note referencing gitignore pattern

This commit is contained in:
Mr. Outis
2019-09-30 11:21:39 -05:00
parent c9c36c2049
commit a9201f8237
+1
View File
@@ -165,6 +165,7 @@ class Git(Base):
@staticmethod
def _escape(entry):
# Reference: https://git-scm.com/docs/gitignore#_pattern_format
meta_characters = r"[]!*#"
return "".join("\\" + x if x in meta_characters else x for x in entry)