Methods for using the ‘ls-tree’ command

async, 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


The git tree

  • git_repo (Union[pathlib.Path, str]) –

  • tree_ish (str) –

  • recursive (bool) –

  • use_long (bool) –

  • path (Optional[pathlib.Path]) –

Return type[Any, Any,[git_interface.datatypes.TreeContent]]