瀏覽代碼

Add default values for IndexEntry (#1496)

this fixes backwards compatibility
Jelmer Vernooij 1 月之前
父節點
當前提交
0834fa8e43
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      dulwich/index.py

+ 2 - 2
dulwich/index.py

@@ -106,8 +106,8 @@ class IndexEntry:
     gid: int
     size: int
     sha: bytes
-    flags: int
-    extended_flags: int
+    flags: int = 0
+    extended_flags: int = 0
 
     @classmethod
     def from_serialized(cls, serialized: SerializedIndexEntry) -> "IndexEntry":