git_interface.archive

Methods used for ‘archive’ command

async git_interface.archive.get_archive(git_repo, archive_type, tree_ish='HEAD')

get a archive of a git repo

param git_repo:

Where the repo is

param archive_type:

What archive type will be created

param tree_ish:

What commit/branch to save, defaults to “HEAD”

raises GitException:

Error to do with git

return:

The content of the archive ready to write to a file

Parameters:
  • git_repo (Path | str)

  • archive_type (ArchiveTypes | str)

  • tree_ish (str)

Return type:

bytes

async git_interface.archive.get_archive_buffered(git_repo, archive_type, tree_ish='HEAD')

get a archive of a git repo, but using a buffered read

param git_repo:

Where the repo is

param archive_type:

What archive type will be created

param tree_ish:

What commit/branch to save, defaults to “HEAD”

raises GitException:

Error to do with git

yield:

Each read content section

Parameters:
  • git_repo (Path | str)

  • archive_type (ArchiveTypes | str)

  • tree_ish (str)

Return type:

AsyncGenerator[bytes, None]