Skip to content

Commit 6caa06d

Browse files
committed
RemoteHead.loid is Oid zero if not available locally
1 parent 93bbff7 commit 6caa06d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pygit2/remotes.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class RemoteHead:
6262

6363
oid: Oid
6464

65-
loid: Oid | None
65+
loid: Oid
6666

6767
name: str | None
6868

@@ -74,12 +74,8 @@ class RemoteHead:
7474

7575
def __init__(self, c_struct: Any) -> None:
7676
self.local = bool(c_struct.local)
77-
if self.local:
78-
self.loid = Oid(raw=bytes(ffi.buffer(c_struct.loid.id)[:]))
79-
else:
80-
self.loid = None
81-
8277
self.oid = Oid(raw=bytes(ffi.buffer(c_struct.oid.id)[:]))
78+
self.loid = Oid(raw=bytes(ffi.buffer(c_struct.loid.id)[:]))
8379
self.name = maybe_string(c_struct.name)
8480
self.symref_target = maybe_string(c_struct.symref_target)
8581

0 commit comments

Comments
 (0)