def get_commit(repo, sha):
    try:
        commit = repo[unicode(sha)]
    except __HOLE__:
        raise NotFound("commit not found")
    if commit.type != GIT_OBJ_COMMIT:
        raise NotFound("object not a commit")
    return commit
dataset/ETHPy150Open hulu/restfulgit/restfulgit/plumbing/retrieval.py/get_commit