~edwargix/git.sr.ht

9ceaab204109e6486601d452e4f74a5c79318f09 — Drew DeVault 5 years ago 933c336
repo.tree: abort(404) on missing commit
1 files changed, 2 insertions(+), 1 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +2 -1
@@ 200,7 200,8 @@ def tree(owner, repo, ref, path):
        if isinstance(commit, pygit2.Tag):
            commit = git_repo.get(commit.target)
        orig_commit = commit

        if not commit:
            abort(404)
        tree = commit.tree
        if not tree:
            abort(404)