Skip to content

Commit 176edd5

Browse files
committed
docs: update the ROOT documentation and error messages
* The documentation now reflects what happens in the setting/repository.go::newRepository function: filepath.Join(AppWorkPath, RepoRootPath) was missing. * The error message displayed when RepoRootPath is not found now displays the value of RepoRootPath. Given the complexity of the construction of this value, only referring to it in the abstract is likely to be misleading to the Gitea admin trying to interpret the message.
1 parent 65e0688 commit 176edd5

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

cmd/serv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func runServ(c *cli.Context) error {
302302
if _, err := os.Stat(setting.RepoRootPath); err != nil {
303303
if os.IsNotExist(err) {
304304
return fail("Incorrect configuration.",
305-
"Directory `[repository]` `ROOT` was not found, please check if $GITEA_WORK_DIR is passed to the SSH connection or make `[repository]` `ROOT` an absolute value.")
305+
"Directory `[repository]` `ROOT` %s was not found, please check if $GITEA_WORK_DIR is passed to the SSH connection or make `[repository]` `ROOT` an absolute value.", setting.RepoRootPath)
306306
}
307307
}
308308

custom/conf/app.example.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,8 @@ PATH =
813813
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
814814
;[repository]
815815
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
816-
;; 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`.
816+
;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)/gitea-repositories.
817+
;; A relative path is interpreted as %(GITEA_WORK_DIR)/%(ROOT)
817818
;ROOT =
818819
;;
819820
;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.

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`: **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`.
45+
- `ROOT`: Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)/gitea-repositories.
46+
A relative path is interpreted as %(GITEA_WORK_DIR)/%(ROOT).
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ https://github.com/loganinak/MigrateGitlabToGogs
6464
- Unix: Environment variable `HOME`
6565
- Windows: Environment variable `USERPROFILE`, else environment variables `HOMEDRIVE`+`HOMEPATH`
6666
- RepoRootPath
67-
- `ROOT` in `app.ini`
67+
- `ROOT` in the \[repository] section of `app.ini` if absolute
68+
- Else `%(AppWorkPath)/ROOT` if `ROOT` in the \[repository] section of `app.ini` if relative
6869
- Else `%(AppDataPath)/gitea-repositories`
6970
- INI (config file)
7071
- `-c` flag

0 commit comments

Comments
 (0)