]> source.dussan.org Git - gitea.git/commitdiff
docs: update the ROOT documentation and error messages (#19832)
authorsinguliere <35190819+singuliere@users.noreply.github.com>
Mon, 30 May 2022 22:47:55 +0000 (00:47 +0200)
committerGitHub <noreply@github.com>
Mon, 30 May 2022 22:47:55 +0000 (00:47 +0200)
* 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.

Co-authored-by: delvh <dev.lh@web.de>
cmd/serv.go
custom/conf/app.example.ini
docs/content/doc/advanced/config-cheat-sheet.en-us.md
docs/content/doc/help/faq.en-us.md

index 340f591dce0b3d52cc1e8914386955ba79be6f51..adfbc6024ca7c01299ba30c5b124735042e9bcf0 100644 (file)
@@ -302,7 +302,7 @@ func runServ(c *cli.Context) error {
        if _, err := os.Stat(setting.RepoRootPath); err != nil {
                if os.IsNotExist(err) {
                        return fail("Incorrect configuration.",
-                               "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.")
+                               "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)
                }
        }
 
index 8362f228123dae70f10a9581e7702c59ee0efdcf..03bdf4535040fafe21a5aee2319c90b6c8cca750 100644 (file)
@@ -813,7 +813,8 @@ PATH =
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;[repository]
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; 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`.
+;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)/gitea-repositories.
+;; A relative path is interpreted as %(GITEA_WORK_DIR)/%(ROOT)
 ;ROOT =
 ;;
 ;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
index 785fd3d6c25e3b3660d0cbba13a9c90d4882c551..9d7f6c126cc6649d3e0da26019777bb74c4b092d 100644 (file)
@@ -42,8 +42,8 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
 
 ## Repository (`repository`)
 
-- `ROOT`: **data/gitea-repositories/**: 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`.
+- `ROOT`: **%(APP_DATA_PATH)/gitea-repositories**: Root path for storing all repository data.
+   A relative path is interpreted as **%(GITEA_WORK_DIR)/%(ROOT)**.
 - `SCRIPT_TYPE`: **bash**: The script type this server supports. Usually this is `bash`,
    but some users report that only `sh` is available.
 - `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.
index ee5a37c948ec4c147ac47891da0ba627e89563bd..a64cccfa66f4ca2dabd785bef68001ae43f23b73 100644 (file)
@@ -64,8 +64,9 @@ https://github.com/loganinak/MigrateGitlabToGogs
   - Unix: Environment variable `HOME`
   - Windows: Environment variable `USERPROFILE`, else environment variables `HOMEDRIVE`+`HOMEPATH`
 - RepoRootPath
-  - `ROOT` in `app.ini`
-  - Else `%(AppDataPath)/gitea-repositories`
+  - `ROOT` in the \[repository] section of `app.ini` if absolute
+  - Else `%(AppWorkPath)/ROOT` if `ROOT` in the \[repository] section of `app.ini` if relative
+  - Default `%(AppDataPath)/gitea-repositories`
 - INI (config file)
   - `-c` flag
   - Else `%(CustomPath)/conf/app.ini`