diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-05 20:21:32 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-05 20:21:32 +0800 |
commit | 71ab9b7f14118f02dd18cd733bd4e0ad19ece590 (patch) | |
tree | 0303cbee651a4e1cee62a348d25066b9543f4425 /git_init.go | |
parent | git2d: Remove UTF-8 checks (diff) | |
download | forge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.tar.gz forge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.tar.zst forge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.zip |
config shall no longer be a global variable
Diffstat (limited to '')
-rw-r--r-- | git_init.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git_init.go b/git_init.go index f1a283e..1800c5a 100644 --- a/git_init.go +++ b/git_init.go @@ -11,7 +11,7 @@ import ( // gitInit initializes a bare git repository with the forge-deployed hooks // directory as the hooksPath. -func gitInit(repoPath string) (err error) { +func (s *server) gitInit(repoPath string) (err error) { var repo *git.Repository var gitConf *gitConfig.Config @@ -23,7 +23,7 @@ func gitInit(repoPath string) (err error) { return err } - gitConf.Raw.SetOption("core", gitFmtConfig.NoSubsection, "hooksPath", config.Hooks.Execs) + gitConf.Raw.SetOption("core", gitFmtConfig.NoSubsection, "hooksPath", s.config.Hooks.Execs) gitConf.Raw.SetOption("receive", gitFmtConfig.NoSubsection, "advertisePushOptions", "true") if err = repo.SetConfig(gitConf); err != nil { |