From 110fc57cbcf293c19ed7017d8ea528b4bbbd7396 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 12 Jun 2022 23:51:54 +0800 Subject: Move some code into models/git (#19879) * Move access and repo permission to models/perm/access * fix test * Move some git related files into sub package models/git * Fix build * fix git test * move lfs to sub package * move more git related functions to models/git * Move functions sequence * Some improvements per @KN4CK3R and @delvh --- modules/repository/create.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/repository/create.go') diff --git a/modules/repository/create.go b/modules/repository/create.go index 95bb825403..3d04dba70f 100644 --- a/modules/repository/create.go +++ b/modules/repository/create.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/db" + git_model "code.gitea.io/gitea/models/git" access_model "code.gitea.io/gitea/models/perm/access" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" @@ -146,7 +147,7 @@ func UpdateRepoSize(ctx context.Context, repo *repo_model.Repository) error { return fmt.Errorf("updateSize: %v", err) } - lfsSize, err := models.GetRepoLFSSize(ctx, repo.ID) + lfsSize, err := git_model.GetRepoLFSSize(ctx, repo.ID) if err != nil { return fmt.Errorf("updateSize: GetLFSMetaObjects: %v", err) } -- cgit v1.2.3