diff options
Diffstat (limited to 'internal/db/migrations')
-rw-r--r-- | internal/db/migrations/v15.go | 8 | ||||
-rw-r--r-- | internal/db/migrations/v16.go | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/internal/db/migrations/v15.go b/internal/db/migrations/v15.go index 72d24143..0631e472 100644 --- a/internal/db/migrations/v15.go +++ b/internal/db/migrations/v15.go @@ -32,9 +32,9 @@ func generateAndMigrateGitHooks(x *xorm.Engine) (err error) { var ( hookNames = []string{"pre-receive", "update", "post-receive"} hookTpls = []string{ - fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' pre-receive\n", conf.ScriptType, conf.AppPath(), conf.CustomConf), - fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' update $1 $2 $3\n", conf.ScriptType, conf.AppPath(), conf.CustomConf), - fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' post-receive\n", conf.ScriptType, conf.AppPath(), conf.CustomConf), + fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' pre-receive\n", conf.Repository.ScriptType, conf.AppPath(), conf.CustomConf), + fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' update $1 $2 $3\n", conf.Repository.ScriptType, conf.AppPath(), conf.CustomConf), + fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' post-receive\n", conf.Repository.ScriptType, conf.AppPath(), conf.CustomConf), } ) @@ -63,7 +63,7 @@ func generateAndMigrateGitHooks(x *xorm.Engine) (err error) { return nil } - repoBase := filepath.Join(conf.RepoRootPath, strings.ToLower(user.Name), strings.ToLower(repo.Name)) + repoBase := filepath.Join(conf.Repository.Root, strings.ToLower(user.Name), strings.ToLower(repo.Name)) repoPath := repoBase + ".git" wikiPath := repoBase + ".wiki.git" log.Trace("[%04d]: %s", idx, repoPath) diff --git a/internal/db/migrations/v16.go b/internal/db/migrations/v16.go index 91bf4925..572dba9c 100644 --- a/internal/db/migrations/v16.go +++ b/internal/db/migrations/v16.go @@ -60,7 +60,7 @@ func updateRepositorySizes(x *xorm.Engine) (err error) { continue } - repoPath := filepath.Join(conf.RepoRootPath, strings.ToLower(user.Name), strings.ToLower(repo.Name)) + ".git" + repoPath := filepath.Join(conf.Repository.Root, strings.ToLower(user.Name), strings.ToLower(repo.Name)) + ".git" countObject, err := git.GetRepoSize(repoPath) if err != nil { log.Warn("GetRepoSize: %v", err) |