From 591673fabd2ca045c3a75e991152fdcdff666286 Mon Sep 17 00:00:00 2001 From: Nolan Prescott Date: Thu, 17 Dec 2020 23:52:37 -0500 Subject: [PATCH] Allow "path" refs in repo links This change should fix the refs URLs using the same approach taken in the archive URL routing which is to capture the subpath, slashes and all as the ref name. Intended to address the first part of this ticket: https://todo.sr.ht/~sircmpwn/git.sr.ht/323 --- gitsrht/blueprints/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index 88e46e7..ce427c4 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -567,7 +567,7 @@ def refs_rss(owner, repo): return generate_feed(repo, references, title, link, description) -@repo.route("///refs/") +@repo.route("///refs/") def ref(owner, repo, ref): owner, repo = get_repo_or_redir(owner, repo) with GitRepository(repo.path) as git_repo: -- 2.38.4