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)