paperweight.gitio¶
Utilities for reading content in git repositories.
-
paperweight.gitio.
read_git_blob
(commit_ref, path, repo_dir='.')¶ Get text from a git blob.
Parameters: commit_ref : str
Any SHA or git tag that can resolve into a commit in the git repository.
path : str
Path to the document in the git repository, relative to the root of the repository.
repo_dir : str
Path from current working directory to the root of the git repository.
Returns: text : unicode
The document text.
-
paperweight.gitio.
absolute_git_root_dir
(fpath='')¶ Absolute path to the git root directory containing a given file or directory.