(refs #823)Enable file finder for branches which contain /

This commit is contained in:
Naoki Takezoe
2015-09-24 13:06:53 +09:00
parent 3970eca8dc
commit 68af5479c8

View File

@@ -523,10 +523,11 @@ trait RepositoryViewerControllerBase extends ControllerBase {
/**
* Displays the file find of branch.
*/
get("/:owner/:repository/find/:ref")(referrersOnly { repository =>
get("/:owner/:repository/find/*")(referrersOnly { repository =>
using(Git.open(getRepositoryDir(repository.owner, repository.name))){ git =>
JGitUtil.getTreeId(git, params("ref")).map{ treeId =>
html.find(params("ref"),
val ref = multiParams("splat").head
JGitUtil.getTreeId(git, ref).map{ treeId =>
html.find(ref,
treeId,
repository,
context.loginAccount match {