MCPcopy Create free account
hub / github.com/libgit2/pygit2 / __init__

Method __init__

pygit2/remotes.py:101–109  ·  view source on GitHub ↗
(self, c_struct: Any)

Source from the content-addressed store, hash-verified

99 """The new target for the reference"""
100
101 def __init__(self, c_struct: Any) -> None:
102 src_refname = maybe_string(c_struct.src_refname)
103 dst_refname = maybe_string(c_struct.dst_refname)
104 assert src_refname is not None, 'libgit2 returned null src_refname'
105 assert dst_refname is not None, 'libgit2 returned null dst_refname'
106 self.src_refname = src_refname
107 self.dst_refname = dst_refname
108 self.src = Oid(raw=bytes(ffi.buffer(c_struct.src.id)[:]))
109 self.dst = Oid(raw=bytes(ffi.buffer(c_struct.dst.id)[:]))
110
111
112class TransferProgress:

Callers

nothing calls this directly

Calls 1

maybe_stringFunction · 0.85

Tested by

no test coverage detected