diff options
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r-- | routers/repo/pull.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index cb5167033c..a4ebb91a39 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -78,6 +78,12 @@ func ForkPost(ctx *middleware.Context, form auth.CreateRepoForm) { return } + repo, has := models.HasForkedRepo(ctxUser.Id, forkRepo.Id) + if has { + ctx.Redirect(setting.AppSubUrl + "/" + ctxUser.Name + "/" + repo.Name) + return + } + // Check ownership of organization. if ctxUser.IsOrganization() { if !ctxUser.IsOwnedBy(ctx.User.Id) { |