mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 21:24:38 +02:00
clean up code
This commit is contained in:
1 parent
114e6790f8
commit
ab9411be2a
3 files changed
+23
-42
No files matched your search
+2
-5
@@ -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})
|
||||
}
|
||||
Reference in new issue
Block a user