mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -22,6 +22,7 @@ import ( | ||||
|  | ||||
| 	"code.gitea.io/gitea/models" | ||||
| 	"code.gitea.io/gitea/models/db" | ||||
| 	git_model "code.gitea.io/gitea/models/git" | ||||
| 	pull_model "code.gitea.io/gitea/models/pull" | ||||
| 	user_model "code.gitea.io/gitea/models/user" | ||||
| 	"code.gitea.io/gitea/modules/analyze" | ||||
| @@ -1219,7 +1220,7 @@ func parseHunks(curFile *DiffFile, maxLines, maxLineCharacters int, input *bufio | ||||
| 		} else if curFileLFSPrefix && strings.HasPrefix(line[1:], lfs.MetaFileOidPrefix) { | ||||
| 			oid := strings.TrimPrefix(line[1:], lfs.MetaFileOidPrefix) | ||||
| 			if len(oid) == 64 { | ||||
| 				m := &models.LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}} | ||||
| 				m := &git_model.LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}} | ||||
| 				count, err := db.CountByBean(db.DefaultContext, m) | ||||
|  | ||||
| 				if err == nil && count > 0 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user