Skip to content

Commit 16301f2

Browse files
authored
Merge branch 'master' into 13683-comment-diff-bug
2 parents 60ce620 + 88b585c commit 16301f2

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

custom/conf/app.example.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ PROJECT_BOARD_BASIC_KANBAN_TYPE = To Do, In Progress, Done
1717
PROJECT_BOARD_BUG_TRIAGE_TYPE = Needs Triage, High Priority, Low Priority, Closed
1818

1919
[repository]
20+
; Root path for storing all repository data. It must be an absolute path. By default it is stored in a sub-directory of `APP_DATA_PATH`.
2021
ROOT =
22+
; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
2123
SCRIPT_TYPE = bash
2224
; DETECTED_CHARSETS_ORDER tie-break order for detected charsets.
2325
; If the charsets have equal confidence, tie-breaking will be done by order in this list

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
4242

4343
## Repository (`repository`)
4444

45-
- `ROOT`: **~/gitea-repositories/**: Root path for storing all repository data. It must be
46-
an absolute path.
45+
- `ROOT`: **data/gitea-repositories/**: Root path for storing all repository data. It must be
46+
an absolute path. By default it is stored in a sub-directory of `APP_DATA_PATH`.
4747
- `SCRIPT_TYPE`: **bash**: The script type this server supports. Usually this is `bash`,
4848
but some users report that only `sh` is available.
4949
- `DETECTED_CHARSETS_ORDER`: **UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr**: Tie-break order of detected charsets - if the detected charsets have equal confidence, charsets earlier in the list will be chosen in preference to those later. Adding `defaults` will place the unnamed charsets at that point.

docs/content/doc/help/faq.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ https://github.com/loganinak/MigrateGitlabToGogs
6464
- Windows: Environment variable `USERPROFILE`, else environment variables `HOMEDRIVE`+`HOMEPATH`
6565
- RepoRootPath
6666
- `ROOT` in `app.ini`
67-
- Else `%(HomeDir)/gitea-repositories`
67+
- Else `%(AppDataPath)/gitea-repositories`
6868
- INI (config file)
6969
- `-c` flag
7070
- Else `%(CustomPath)/conf/app.ini`

modules/setting/repository.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import (
1010
"strings"
1111

1212
"code.gitea.io/gitea/modules/log"
13-
14-
"github.com/unknwon/com"
1513
)
1614

1715
// enumerates all the policy repository creating
@@ -249,19 +247,14 @@ var (
249247
)
250248

251249
func newRepository() {
252-
homeDir, err := com.HomeDir()
253-
if err != nil {
254-
log.Fatal("Failed to get home directory: %v", err)
255-
}
256-
homeDir = strings.ReplaceAll(homeDir, "\\", "/")
257-
250+
var err error
258251
// Determine and create root git repository path.
259252
sec := Cfg.Section("repository")
260253
Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
261254
Repository.UseCompatSSHURI = sec.Key("USE_COMPAT_SSH_URI").MustBool()
262255
Repository.MaxCreationLimit = sec.Key("MAX_CREATION_LIMIT").MustInt(-1)
263256
Repository.DefaultBranch = sec.Key("DEFAULT_BRANCH").MustString(Repository.DefaultBranch)
264-
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gitea-repositories"))
257+
RepoRootPath = sec.Key("ROOT").MustString(path.Join(AppDataPath, "gitea-repositories"))
265258
forcePathSeparator(RepoRootPath)
266259
if !filepath.IsAbs(RepoRootPath) {
267260
RepoRootPath = filepath.Join(AppWorkPath, RepoRootPath)

snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ architectures:
1818

1919
environment:
2020
GITEA_CUSTOM: "$SNAP_COMMON"
21-
GITEA_WORK_DIR: "$SNAP_DATA"
21+
GITEA_WORK_DIR: "$SNAP_COMMON"
2222
GIT_TEMPLATE_DIR: "$SNAP/usr/share/git-core/templates"
2323
GIT_EXEC_PATH: "$SNAP/usr/lib/git-core"
2424

0 commit comments

Comments
 (0)