diff options
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/models/repo.go b/models/repo.go index 870e63b207..56e5e00eea 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1409,21 +1409,9 @@ func DeleteRepository(uid, repoID int64) error { } if repo.NumForks > 0 { - if repo.IsPrivate { - forkRepos, err := GetRepositoriesByForkID(repo.ID) - if err != nil { - return fmt.Errorf("getRepositoriesByForkID: %v", err) - } - for i := range forkRepos { - if err = DeleteRepository(forkRepos[i].OwnerID, forkRepos[i].ID); err != nil { - log.Error(4, "DeleteRepository [%d]: %v", forkRepos[i].ID, err) - } - } - } else { if _, err = x.Exec("UPDATE `repository` SET fork_id=0,is_fork=? WHERE fork_id=?", false, repo.ID); err != nil { log.Error(4, "reset 'fork_id' and 'is_fork': %v", err) } - } } return nil |