~edwargix/git.sr.ht

fa62201a5ac265330373d52bf226e113d4dde36d — Drew DeVault 3 years ago 91333aa
Fix (another) issue with non-commit tags

~gregkh/linux-stable has a tag which points to a tree.
1 files changed, 2 insertions(+), 1 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +2 -1
@@ 107,7 107,8 @@ def summary(owner, repo):
            for ref in git_repo.raw_listall_references()
            if ref.startswith(b"refs/tags/")]
        tags = [tag for tag in tags
                if isinstance(tag[1], pygit2.Tag) or isinstance(tag[1], pygit2.Commit)]
                if (isinstance(tag[1], pygit2.Tag) or isinstance(tag[1], pygit2.Commit))
                and isinstance(tag[1].get_object(), pygit2.Commit)]
        tags = sorted(tags, key=lambda c: commit_time(c[1]), reverse=True)
        latest_tag = tags[0] if len(tags) else None