~edwargix/git.sr.ht

c08a9c71eb564b145f296c07536bb3514776906a — Nolan Prescott 3 years ago b09557d
Sort refs by commit date instead of tag date

Previously, git refs listed in reverse chronological order based on
tag-time.

Now, list in reverse chronological order based on commit-time of the
referenced commit.

Intended to address: https://todo.sr.ht/~sircmpwn/git.sr.ht/322
1 files changed, 1 insertions(+), 1 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +1 -1
@@ 505,7 505,7 @@ def refs(owner, repo):
        def _tag_key(tag):
            if isinstance(tag[1], pygit2.Commit):
                return tag[1].commit_time
            return tag[1].tagger.time
            return tag[1].get_object().commit_time
        tags = sorted(tags, key=_tag_key, reverse=True)
        branches = [(
                branch,