repo.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:github-reviewboard-sync 作者: Apptimize-OSS 项目源码 文件源码
def _get_relevant_commits(repo, commit_shas, branch):
    """
    Gets all commits on the repo with the given shas

    :param Repo repo:
    :param list[unicode] commit_shas:
    :param unicode branch:
    :return: list[Commit]
    """
    remaining_shas = set(commit_shas)
    commits = list()
    for commit in repo.iter_commits(branch):
        if commit.hexsha in remaining_shas:
            commits.append(commit)
            remaining_shas.remove(commit.hexsha)
    return commits
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号