git_interface.cat_file
Methods for using the ‘cat-file’ command
- async git_interface.cat_file.get_object_size(git_repo, tree_ish, file_path)
Gets the objects size from repo
- param git_repo:
Path to the repo
- param tree_ish:
The tree ish (branch name, HEAD)
- param file_path:
The file in the repo to read
- raises UnknownRevisionException:
Invalid tree_ish or file_path
- raises GitException:
Error to do with git
- return:
The object size
- Parameters:
git_repo (Path | str)
tree_ish (str)
file_path (str)
- Return type:
int
- async git_interface.cat_file.get_object_type(git_repo, tree_ish, file_path)
Gets the object type from repo
- param git_repo:
Path to the repo
- param tree_ish:
The tree ish (branch name, HEAD)
- param file_path:
The file in the repo to read
- raises UnknownRevisionException:
Invalid tree_ish or file_path
- raises GitException:
Error to do with git
- return:
The object type
- Parameters:
git_repo (Path | str)
tree_ish (str)
file_path (str)
- Return type:
TreeContentTypes
- async git_interface.cat_file.get_pretty_print(git_repo, tree_ish, file_path)
Gets a object from repo
- param git_repo:
Path to the repo
- param tree_ish:
The tree ish (branch name, HEAD)
- param file_path:
The file in the repo to read
- raises UnknownRevisionException:
Invalid tree_ish or file_path
- raises GitException:
Error to do with git
- return:
The object type
- Parameters:
git_repo (Path | str)
tree_ish (str)
file_path (str)
- Return type:
bytes