瀏覽代碼

Handle .gitignore files with \r\n line endings

Segev Finer 7 年之前
父節點
當前提交
9e3678489d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dulwich/ignore.py

+ 1 - 1
dulwich/ignore.py

@@ -98,7 +98,7 @@ def read_ignore_patterns(f):
     """
 
     for l in f:
-        l = l.rstrip(b"\n")
+        l = l.rstrip(b"\r\n")
 
         # Ignore blank lines, they're used for readability.
         if not l: