git_interface.ls

Methods for using the ‘ls-tree’ command

async git_interface.ls.ls_tree(git_repo, tree_ish, recursive, use_long, path=None)

Get the tree of objects in repo

param git_repo:

Path to the repo

param tree_ish:

The tree ish (branch name, HEAD)

param recursive:

Whether tree is recursive

param use_long:

Whether to get object sizes

param path:

Filter path, defaults to None

raises UnknownRevisionException:

Unknown tree_ish

raises GitException:

Error to do with git

return:

The git tree

Parameters:
  • git_repo (Path | str)

  • tree_ish (str)

  • recursive (bool)

  • use_long (bool)

  • path (Path | None)

Return type:

Iterator[TreeContent]