<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def 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. """

    repo = git.Repo(repo_dir)
    tree = repo.tree(commit_ref)
    dirname, fname = os.path.split(path)
    text = None
    if dirname == '':
        text = _read_blob(tree, fname)
    else:
        components = path.split(os.sep)
        text = _read_blob_in_tree(tree, components)
    return text