diff options
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r-- | routers/repo/pull.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index d2aea3d2..6ccca57c 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -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 |