-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
remove deprecated settings #33872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove deprecated settings #33872
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,20 +38,9 @@ func loadLFSFrom(rootCfg ConfigProvider) error { | |
| mustMapSetting(rootCfg, "server", &LFS) | ||
| sec := rootCfg.Section("server") | ||
|
|
||
| // legacy LFS_CONTENT_PATH option has been moved to removed.go | ||
| lfsSec, _ := rootCfg.GetSection("lfs") | ||
|
|
||
| // Specifically default PATH to LFS_CONTENT_PATH | ||
| // DEPRECATED should not be removed because users maybe upgrade from lower version to the latest version | ||
| // if these are removed, the warning will not be shown | ||
| deprecatedSetting(rootCfg, "server", "LFS_CONTENT_PATH", "lfs", "PATH", "v1.19.0") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we still keep them at the original places? I think that will help code readers to find the history of the code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First version added errors to every setting loader function which would allow to keep the history, but as it has been explained - settings might do changes based on configuration options so early failure is better. See #33761 (comment) for explanation and basis for this approach. I do agree that it's less than ideal though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or we can put some comments in the original places as a reference? |
||
|
|
||
| if val := sec.Key("LFS_CONTENT_PATH").String(); val != "" { | ||
| if lfsSec == nil { | ||
| lfsSec = rootCfg.Section("lfs") | ||
| } | ||
| lfsSec.Key("PATH").MustString(val) | ||
| } | ||
|
|
||
| var err error | ||
| LFS.Storage, err = getStorage(rootCfg, "lfs", "", lfsSec) | ||
| if err != nil { | ||
|
|
||