소스 검색

Add default values for IndexEntry (#1496)

this fixes backwards compatibility
Jelmer Vernooij 3 달 전
부모
커밋
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":