mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
#1206 does not allow fork bare repo
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user