Răsfoiți Sursa

Add default values for IndexEntry

this fixes backwards compatibility
Jelmer Vernooij 1 lună în urmă
părinte
comite
1d364801f3
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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":