Return commits in chronological order

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
2022-08-02 20:53:29 +02:00
parent 8bc6a7b578
commit a2bf978fde
2 changed files with 5 additions and 1 deletions

View File

@@ -467,10 +467,14 @@ def test_list_commits(cloned_base_repo_obj):
assert cloned_base_repo_obj.list_commits(3)
count = 0
commits = set()
last_commit = ""
for commit in cloned_base_repo_obj.list_commits(20):
count += 1
commits.add(commit.hexsha)
last_commit = commit.hexsha
assert count == 20
# should be newest commit in repo
assert last_commit == "e0c7e2a72579e24657c05e875201011d2b48bf94"
assert commits == {
'93e97409040f6e4ba5cebc4ddca679a2d3203efa', 'd8cd3257e05dc4a3d0061b5320ef5efd0b45d840',