@@ -10,12 +10,10 @@ import (
1010 "code.gitea.io/gitea/modules/generate"
1111)
1212
13- const (
14- LFSConfigSectionServer = "server"
15- LFSConfigSectionClient = "lfs_client"
16- )
17-
18- // LFS represents the legacy configuration for Git LFS, to be migrated to LFSServer
13+ // LFS represents the server-side configuration for Git LFS.
14+ // Ideally these options should be in a section like "[lfs_server]",
15+ // but they are in "[server]" section due to historical reasons.
16+ // Could be refactored in the future while keeping backwards compatibility.
1917var LFS = struct {
2018 StartServer bool `ini:"LFS_START_SERVER"`
2119 AllowPureSSH bool `ini:"LFS_ALLOW_PURE_SSH"`
@@ -28,16 +26,16 @@ var LFS = struct {
2826 Storage * Storage
2927}{}
3028
31- // LFSClient represents configuration for mirroring upstream Git LFS
29+ // LFSClient represents configuration for Gitea's LFS clients, for example: mirroring upstream Git LFS
3230var LFSClient = struct {
3331 BatchSize int `ini:"BATCH_SIZE"`
3432}{}
3533
3634func loadLFSFrom (rootCfg ConfigProvider ) error {
37- mustMapSetting (rootCfg , LFSConfigSectionClient , & LFSClient )
38- mustMapSetting (rootCfg , LFSConfigSectionServer , & LFS )
35+ mustMapSetting (rootCfg , "lfs_client" , & LFSClient )
3936
40- sec := rootCfg .Section (LFSConfigSectionServer )
37+ mustMapSetting (rootCfg , "server" , & LFS )
38+ sec := rootCfg .Section ("server" )
4139
4240 lfsSec , _ := rootCfg .GetSection ("lfs" )
4341
0 commit comments