1
0
Fork 0
forked from forgejo/forgejo

Use git.HOME_PATH for Git HOME directory (#20114) (#20293)

Before, in #19732, the old home directory is not correct.
This PR introduces a new config option for git home: git.HOME_PATH,
which is default to %(APP_DATA_PATH)/home

And pass env GNUPGHOME to git command, force Gitea to use a stable GNUPGHOME directory
This commit is contained in:
wxiaoguang 2022-07-08 21:44:36 +08:00 committed by GitHub
parent 039a60225a
commit 5e5ff77ed7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 64 additions and 28 deletions

View file

@ -107,6 +107,8 @@ func MainTest(m *testing.M, testOpts *TestOptions) {
setting.Packages.Storage.Path = filepath.Join(setting.AppDataPath, "packages")
setting.Git.HomePath = filepath.Join(setting.AppDataPath, "home")
if err = storage.Init(); err != nil {
fatalTestError("storage.Init: %v\n", err)
}