def get_commit_for_refspec(repo, branch_or_tag_or_sha):
    try:
        commit = repo.revparse_single(branch_or_tag_or_sha)
        if commit.type == GIT_OBJ_TAG:
            commit = commit.peel(GIT_OBJ_COMMIT)
        return commit
    except __HOLE__:
        raise NotFound("no such branch, tag, or commit SHA")
dataset/ETHPy150Open hulu/restfulgit/restfulgit/porcelain/retrieval.py/get_commit_for_refspec