aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-16 23:33:40 -0500
committerUnknwon <u@gogs.io>2015-11-16 23:33:40 -0500
commitab9411be2ae01970f4c2c092683bd9d9b71c994b (patch)
tree22d93d50518c81893429e88e6eccf64b0e1ead55 /models
parent114e6790f8013474943718b478c27ea96cb22e18 (diff)
downloadgitea-ab9411be2ae01970f4c2c092683bd9d9b71c994b.tar.gz
gitea-ab9411be2ae01970f4c2c092683bd9d9b71c994b.zip
clean up code
Diffstat (limited to 'models')
-rw-r--r--models/repo.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/models/repo.go b/models/repo.go
index 0e10e171db..174fbd9d59 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1865,9 +1865,6 @@ func ForkRepository(u *User, oldRepo *Repository, name, desc string) (_ *Reposit
}
func (repo *Repository) GetForks() ([]*Repository, error) {
- forks := make([]*Repository, 0, 10)
-
- err := x.Find(&forks, &Repository{ForkID: repo.ID})
-
- return forks, err
+ forks := make([]*Repository, 0, repo.NumForks)
+ return forks, x.Find(&forks, &Repository{ForkID: repo.ID})
}