summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-07-08 21:44:36 +0800
committerGitHub <noreply@github.com>2022-07-08 21:44:36 +0800
commit5e5ff77ed7731ccc608ba4851452a77eab285b9c (patch)
tree735a21d348d5f4bae98f0a68b280d6cde575510b /models
parent039a60225a4b71e0e880db3dfd7b640fa02f5e66 (diff)
downloadgitea-5e5ff77ed7731ccc608ba4851452a77eab285b9c.tar.gz
gitea-5e5ff77ed7731ccc608ba4851452a77eab285b9c.zip
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
Diffstat (limited to 'models')
-rw-r--r--models/unittest/testdb.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go
index baea46dbce..7f9af55374 100644
--- a/models/unittest/testdb.go
+++ b/models/unittest/testdb.go
@@ -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)
}