1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor repository check and sync functions (#9854)

Move more general repository functions out of models/repo.go
This commit is contained in:
Lunny Xiao
2020-01-21 04:01:19 +08:00
committed by zeripath
parent 27c6b8fc07
commit d92781bf94
12 changed files with 313 additions and 210 deletions

View File

@@ -164,7 +164,7 @@ func checkInitRepository(repoPath string) (err error) {
// Init git bare new repository.
if err = git.InitRepository(repoPath, true); err != nil {
return fmt.Errorf("git.InitRepository: %v", err)
} else if err = models.CreateDelegateHooks(repoPath); err != nil {
} else if err = createDelegateHooks(repoPath); err != nil {
return fmt.Errorf("createDelegateHooks: %v", err)
}
return nil