class documentation

class BackendRepo(TypingProtocol):

View In Hierarchy

Repository abstraction used by the Git server.

The methods required here are a subset of those provided by dulwich.repo.Repo.

Method find_missing_objects Yield the objects required for a list of commits.
Method get_peeled Return the cached peeled value of a ref, if available.
Method get_refs Get all the refs in the repository.
Class Variable object_format Undocumented
Class Variable object_store Undocumented
Class Variable refs Undocumented
def find_missing_objects(self, determine_wants: Callable[[Mapping[Ref, ObjectID], (int | None)], list[ObjectID]], graph_walker: _ProtocolGraphWalker, progress: Callable[[bytes], None] | None, *, get_tagged: Callable[[], dict[ObjectID, ObjectID]] | None = None, depth: int | None = None) -> MissingObjectFinder | None:

Yield the objects required for a list of commits.

Parameters
determine_wants:Callable[[Mapping[Ref, ObjectID], (int | None)], list[ObjectID]]Function to determine which objects the client wants
graph_walker:_ProtocolGraphWalkerObject used to walk the commit graph
progress:Callable[[bytes], None] | Noneis a callback to send progress messages to the client
get_tagged:Callable[[], dict[ObjectID, ObjectID]] | NoneFunction that returns a dict of pointed-to sha -> tag sha for including tags.
depth:int | NoneMaximum depth of commits to fetch for shallow clones
Returns
MissingObjectFinder | NoneUndocumented
def get_peeled(self, name: bytes) -> ObjectID | None:

Return the cached peeled value of a ref, if available.

Returns: The peeled value of the ref. If the ref is known not point to
a tag, this will be the SHA the ref refers to. If no cached information about a tag is available, this method may return None, but it should attempt to peel the tag if possible.
Parameters
name:bytesName of the ref to peel
Returns
ObjectID | NoneUndocumented
def get_refs(self) -> dict[bytes, bytes]:

Get all the refs in the repository.

Returns: dict of name -> sha

object_format: ObjectFormat =

Undocumented

object_store: PackBasedObjectStore =

Undocumented

Undocumented