mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 14:35:52 +01:00
Ensure display file content of specified commit
This commit is contained in:
@@ -213,7 +213,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
|
|||||||
case branch if(path == branch || path.startsWith(branch + "/")) => branch
|
case branch if(path == branch || path.startsWith(branch + "/")) => branch
|
||||||
} orElse repository.tags.collectFirst {
|
} orElse repository.tags.collectFirst {
|
||||||
case tag if(path == tag.name || path.startsWith(tag.name + "/")) => tag.name
|
case tag if(path == tag.name || path.startsWith(tag.name + "/")) => tag.name
|
||||||
} orElse Some(path) get
|
} orElse Some(path.split("/")(0)) get
|
||||||
|
|
||||||
(id, path.substring(id.length).replaceFirst("^/", ""))
|
(id, path.substring(id.length).replaceFirst("^/", ""))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user