Fix generation of Blame url
The Blame URLs returned by `url_for` currently return e.g. `b'master'` for the ref component, breaking the "Blame" tab. Example: https://git.sr.ht/~yyny/test/blame/b%27master%27/README.md This patch fixes that.
This commit is contained in:
parent
7144962487
commit
2b4c2f9972
|
@ -416,7 +416,7 @@ def weld_hunks(blame):
|
|||
yield last
|
||||
|
||||
@repo.route("/<owner>/<repo>/blame/<path:ref>", defaults={"path": ""})
|
||||
@repo.route("/<owner>/<repo>/blame/<ref>/<path:path>")
|
||||
@repo.route("/<owner>/<repo>/blame/<path:ref>/<path:path>")
|
||||
def blame(owner, repo, ref, path):
|
||||
owner, repo = get_repo_or_redir(owner, repo)
|
||||
with GitRepository(repo.path) as git_repo:
|
||||
|
|
Loading…
Reference in New Issue