Skip to content

Commit

Permalink
Use the standart way to find diff between commits
Browse files Browse the repository at this point in the history
  • Loading branch information
thenno committed Nov 1, 2023
1 parent 711d6d4 commit e4b8bac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terrarium/dl_gitmanager/dl_gitmanager/git_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def get_all_ancestor_commits(self, commit: str) -> set[str]:
return set(commits)

def get_missing_commits(self, base: str, head: str) -> set[str]:
return self.get_all_ancestor_commits(head) - self.get_all_ancestor_commits(base)
commits = [commit.hexsha for commit in self.git_repo.iter_commits(f"{base}...{head}")]
return set(commits)

def get_submodule_manager(self, submodule_name: str) -> GitManager:
submodule_dict = {sm.name: sm for sm in self.git_repo.submodules}
Expand Down

0 comments on commit e4b8bac

Please sign in to comment.