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[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[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]
- async git_interface.pack.ssh_pack_exchange(git_repo, pack_type, stdin)
Used to handle git pack exchange for a ssh connection.
- param git_repo
Path to the repo
- param pack_type
The pack-type (‘git-upload-pack’ or ‘git-receive-pack’)
- param stdin
Input to feed from client
- yield
Output to send to client
- Parameters
git_repo (Union[str, Path]) –
pack_type (str) –
stdin (AsyncGenerator[bytes, None]) –
- Return type
AsyncGenerator[bytes, None]