#1206 does not allow fork bare repo

This commit is contained in:
Unknwon 2015-09-01 11:57:02 -04:00
parent 398569f6f8
commit 670ade9a61
3 changed files with 12 additions and 1 deletions

View file

@ -33,6 +33,13 @@ func getForkRepository(ctx *middleware.Context) *models.Repository {
}
return nil
}
// Cannot fork bare repo.
if forkRepo.IsBare {
ctx.Handle(404, "", nil)
return nil
}
ctx.Data["repo_name"] = forkRepo.Name
ctx.Data["desc"] = forkRepo.Description
ctx.Data["IsPrivate"] = forkRepo.IsPrivate