~edwargix/git.sr.ht

3b7ed082295e605753bc8f80eabf5eb712ba82e7 — Drew DeVault 6 years ago 58ae3d7
Fix exception in case where tree is browing a tag
1 files changed, 2 insertions(+), 0 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +2 -0
@@ 143,6 143,8 @@ def tree(owner, repo, ref, path):
            return render_empty_repo(owner, repo)

        commit, ref, path = lookup_ref(git_repo, ref, path)
        if isinstance(commit, pygit2.Tag):
            commit = git_repo.get(commit.target)

        tree = commit.tree
        if not tree: