From 8c2dd3f23b6d67ee3bfa106bff210b7f3ed04279 Mon Sep 17 00:00:00 2001 From: jstzwj <1103870790@qq.com> Date: Thu, 5 Sep 2024 05:26:27 +0800 Subject: [PATCH] commits bug fix --- olah/mirror/repos.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/olah/mirror/repos.py b/olah/mirror/repos.py index 3bba7c6..5ada704 100644 --- a/olah/mirror/repos.py +++ b/olah/mirror/repos.py @@ -243,8 +243,7 @@ def get_commits(self, commit_hash: str) -> Optional[Dict[str, Any]]: except gitdb.exc.BadName: return None - parent_commits: List[Commit] = list(commit.parents) - parent_commits = parent_commits.insert(0, commit) + parent_commits = [commit] + [each_commit for each_commit in commit.iter_parents()] items = [] for each_commit in parent_commits: item = {