~edwargix/git.sr.ht

01d0c7bdfa607dd049e6c47df446f4436bee2579 — Drew DeVault 5 years ago 65f1087
Use topological git sort for logs
1 files changed, 1 insertions(+), 1 deletions(-)

M gitsrht/git.py
M gitsrht/git.py => gitsrht/git.py +1 -1
@@ 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