From 1fbe00f49efd5633e3afb890c22a769c86a42130 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 1 Mar 2021 08:48:26 -0500 Subject: [PATCH] Fix tree paths with slashes in refs --- 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 dfbcddf..15f2c51 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -192,7 +192,7 @@ def lookup_ref(git_repo, ref, path): def tree(owner, repo, ref, path): owner, repo = get_repo_or_redir(owner, repo) - if ref and "/" in ref: + if ref and "/" in ref and not path: ref, _, path = ref.partition("/") with GitRepository(repo.path) as git_repo: -- 2.38.4