summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-07-04 17:27:06 +0800
committerUnknwon <u@gogs.io>2016-07-04 17:27:06 +0800
commit4b25bdfbc45479d64e3ffb04abbd08672ccc47fb (patch)
treebbede594875a146bf4c34ce2760202cffe6aeb33 /modules/setting
parent528682a294834611a95b2cf6c80efdccdf6fd791 (diff)
downloadgitea-4b25bdfbc45479d64e3ffb04abbd08672ccc47fb.tar.gz
gitea-4b25bdfbc45479d64e3ffb04abbd08672ccc47fb.zip
#3058 #3059 support correct page size and link header
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go39
1 files changed, 23 insertions, 16 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 4bd77ca6a1..10cb2b2a21 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -159,20 +159,6 @@ var (
SessionConfig session.Options
CSRFCookieName = "_csrf"
- // Git settings
- Git struct {
- MaxGitDiffLines int
- MaxGitDiffLineCharacters int
- MaxGitDiffFiles int
- GcArgs []string `delim:" "`
- Timeout struct {
- Migrate int
- Mirror int
- Clone int
- Pull int
- } `ini:"git.timeout"`
- }
-
// Cron tasks
Cron struct {
UpdateMirror struct {
@@ -194,6 +180,25 @@ var (
} `ini:"cron.check_repo_stats"`
}
+ // Git settings
+ Git struct {
+ MaxGitDiffLines int
+ MaxGitDiffLineCharacters int
+ MaxGitDiffFiles int
+ GcArgs []string `delim:" "`
+ Timeout struct {
+ Migrate int
+ Mirror int
+ Clone int
+ Pull int
+ } `ini:"git.timeout"`
+ }
+
+ // API settings
+ API struct {
+ MaxResponseItems int
+ }
+
// I18n settings
Langs, Names []string
dateLangs map[string]string
@@ -465,10 +470,12 @@ func NewContext() {
if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil {
log.Fatal(4, "Fail to map Markdown settings: %v", err)
- } else if err = Cfg.Section("git").MapTo(&Git); err != nil {
- log.Fatal(4, "Fail to map Git settings: %v", err)
} else if err = Cfg.Section("cron").MapTo(&Cron); err != nil {
log.Fatal(4, "Fail to map Cron settings: %v", err)
+ } else if err = Cfg.Section("git").MapTo(&Git); err != nil {
+ log.Fatal(4, "Fail to map Git settings: %v", err)
+ } else if err = Cfg.Section("api").MapTo(&API); err != nil {
+ log.Fatal(4, "Fail to map API settings: %v", err)
}
Langs = Cfg.Section("i18n").Key("LANGS").Strings(",")