module documentation

Bundle format support.

Class Bundle Git bundle object representation.
Class PackDataLike Protocol for objects that behave like PackData.
Function create_bundle_from_repo Create a bundle from a repository.
Function read_bundle Read a bundle file.
Function write_bundle Write a bundle to a file.
Function _read_bundle Undocumented
def create_bundle_from_repo(repo: BaseRepo, refs: Sequence[Ref] | None = None, prerequisites: Sequence[bytes] | None = None, version: int | None = None, capabilities: dict[str, str | None] | None = None, progress: Callable[[str], None] | None = None) -> Bundle:

Create a bundle from a repository.

Parameters
repo:BaseRepoRepository object to create bundle from
refs:Sequence[Ref] | NoneList of refs to include (defaults to all refs)
prerequisites:Sequence[bytes] | NoneList of commit SHAs that are prerequisites
version:int | NoneBundle version (2 or 3, auto-detected if None)
capabilities:dict[str, str | None] | NoneBundle capabilities (for v3 bundles)
progress:Callable[[str], None] | NoneOptional progress reporting function
Returns
BundleBundle object ready for writing
def read_bundle(f: BinaryIO) -> Bundle:

Read a bundle file.

Parameters
f:BinaryIOA seekable binary file-like object. The file must remain open for the lifetime of the returned Bundle object.
Returns
BundleUndocumented
def write_bundle(f: BinaryIO, bundle: Bundle):

Write a bundle to a file.

Parameters
f:BinaryIOFile-like object to write to
bundle:BundleBundle object to write
def _read_bundle(f: BinaryIO, version: int) -> Bundle:

Undocumented