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

Class RemoteHead

pygit2/remotes.py:55–81  ·  view source on GitHub ↗

Description of a reference advertised by a remote server, given out on `Remote.list_heads` calls.

Source from the content-addressed store, hash-verified

53
54
55class RemoteHead:
56 """
57 Description of a reference advertised by a remote server,
58 given out on `Remote.list_heads` calls.
59 """
60
61 local: bool
62 """Available locally"""
63
64 oid: Oid
65
66 loid: Oid
67
68 name: str | None
69
70 symref_target: str | None
71 """
72 If the server sent a symref mapping for this ref, this will
73 point to the target.
74 """
75
76 def __init__(self, c_struct: Any) -> None:
77 self.local = bool(c_struct.local)
78 self.oid = Oid(raw=bytes(ffi.buffer(c_struct.oid.id)[:]))
79 self.loid = Oid(raw=bytes(ffi.buffer(c_struct.loid.id)[:]))
80 self.name = maybe_string(c_struct.name)
81 self.symref_target = maybe_string(c_struct.symref_target)
82
83
84class PushUpdate:

Callers 1

list_headsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…