Fix message for empty repository

This commit is contained in:
Naoki Takezoe
2014-04-11 11:57:16 +09:00
parent 2ae7798591
commit 9c4f7cc530
4 changed files with 25 additions and 20 deletions

View File

@@ -264,7 +264,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
*/
private def fileList(repository: RepositoryService.RepositoryInfo, revstr: String = "", path: String = ".") = {
if(repository.commitCount == 0){
repo.html.guide(repository)
repo.html.guide(repository, hasWritePermission(repository.owner, repository.name, context.loginAccount))
} else {
using(Git.open(getRepositoryDir(repository.owner, repository.name))){ git =>
//val revisions = Seq(if(revstr.isEmpty) repository.repository.defaultBranch else revstr, repository.branchList.head)