From 01d0c7bdfa607dd049e6c47df446f4436bee2579 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 16 Mar 2020 11:54:22 -0400 Subject: [PATCH] Use topological git sort for logs --- gitsrht/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitsrht/git.py b/gitsrht/git.py index 2a41fd3..23c224d 100644 --- a/gitsrht/git.py +++ b/gitsrht/git.py @@ -28,7 +28,7 @@ def _get_ref(repo, ref): def get_log(git_repo, commit, commits_per_page=20, until=None): commits = list() - for commit in git_repo.walk(commit.id, pygit2.GIT_SORT_TIME): + for commit in git_repo.walk(commit.id, pygit2.GIT_SORT_TOPOLOGICAL): commits.append(commit) if until is not None and commit == until: break -- 2.38.4