~edwargix/git.sr.ht

a74a5c15673787d5601862a9456ae0b9c0674510 — Drew DeVault 6 years ago eb75b78
Fix 500 on ref detail page
1 files changed, 6 insertions(+), 1 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +6 -1
@@ 383,6 383,11 @@ def ref(owner, repo, ref):
    if not has_access(repo, UserAccess.read):
        abort(401)
    git_repo = CachedRepository(repo.path)
    commit, ref = lookup_ref(git_repo, ref)
    try:
        tag = git_repo.revparse_single(ref)
    except KeyError:
        abort(404)
    except ValueError:
        abort(404)
    return render_template("ref.html", view="refs",
            owner=owner, repo=repo, git_repo=git_repo, tag=tag)