diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-12 20:11:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 20:11:17 +0800 |
commit | b465d0d78793da6e67890a7cb9d3ae1b807c53ca (patch) | |
tree | 1cdfb83699ad2fd31d5835bb2ac1e1b579eaf784 /modules/repofiles | |
parent | 5765212c6dbcaeb27779707af3ca57775e535bd9 (diff) | |
download | gitea-b465d0d78793da6e67890a7cb9d3ae1b807c53ca.tar.gz gitea-b465d0d78793da6e67890a7cb9d3ae1b807c53ca.zip |
Move create/fork repository from models to modules/repository (#9489)
* Move create/fork repository from models to modules/repository
* fix wrong reference
* fix test
* fix test
* fix lint
* Fix DBContext
* remove duplicated TestMain
* fix lint
* fix conflicts
Diffstat (limited to 'modules/repofiles')
-rw-r--r-- | modules/repofiles/update.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/repofiles/update.go b/modules/repofiles/update.go index 3a0ba668c1..812649af36 100644 --- a/modules/repofiles/update.go +++ b/modules/repofiles/update.go @@ -458,7 +458,7 @@ func PushUpdate(repo *models.Repository, branch string, opts PushUpdateOptions) } defer gitRepo.Close() - if err = repo.UpdateSize(); err != nil { + if err = repo.UpdateSize(models.DefaultDBContext()); err != nil { log.Error("Failed to update size for repository: %v", err) } @@ -498,7 +498,7 @@ func PushUpdates(repo *models.Repository, optsList []*PushUpdateOptions) error { if err != nil { return fmt.Errorf("OpenRepository: %v", err) } - if err = repo.UpdateSize(); err != nil { + if err = repo.UpdateSize(models.DefaultDBContext()); err != nil { log.Error("Failed to update size for repository: %v", err) } |