git_interface.pack

Methods for using commands relating to git packs

git_interface.pack.advertise_pack(git_repo, pack_type)

Used to advertise packs between remote and client.

Parameters
  • git_repo (Union[pathlib.Path, str]) – Path to the repo

  • pack_type (str) – The pack-type (‘git-upload-pack’ or ‘git-receive-pack’)

Returns

The buffered output stream as a AsyncGenerator

Return type

AsyncGenerator[bytes, None]

git_interface.pack.exchange_pack(git_repo, pack_type, input_stream)

Used to exchange packs between client and remote.

Parameters
  • git_repo (Union[pathlib.Path, str]) – Path to the repo

  • pack_type (str) – The pack-type (‘git-upload-pack’ or ‘git-receive-pack’)

  • input_stream (AsyncGenerator[bytes, None]) – The buffered input stream

Returns

The buffered output stream as a AsyncGenerator

Return type

AsyncGenerator[bytes, None]