mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Fix schema minimum for refresh and fetch intervals
The schema annotated refreshInterval and fetchInterval with minimum=0, but the background routines reject a value of 0 (they require interval > 0 and otherwise log it as invalid and disable the feature). So 0 is not actually a valid value; switch to exclusiveMinimum=0 so the schema matches what the code accepts.
This commit is contained in:
parent
fcaf1512bd
commit
04d62e072b
|
|
@ -44,10 +44,10 @@ type UserConfig struct {
|
|||
type RefresherConfig struct {
|
||||
// File/submodule refresh interval in seconds.
|
||||
// Auto-refresh can be disabled via option 'git.autoRefresh'.
|
||||
RefreshInterval int `yaml:"refreshInterval" jsonschema:"minimum=0"`
|
||||
RefreshInterval int `yaml:"refreshInterval" jsonschema:"exclusiveMinimum=0"`
|
||||
// Re-fetch interval in seconds.
|
||||
// Auto-fetch can be disabled via option 'git.autoFetch'.
|
||||
FetchInterval int `yaml:"fetchInterval" jsonschema:"minimum=0"`
|
||||
FetchInterval int `yaml:"fetchInterval" jsonschema:"exclusiveMinimum=0"`
|
||||
}
|
||||
|
||||
func (c *RefresherConfig) RefreshIntervalDuration() time.Duration {
|
||||
|
|
|
|||
|
|
@ -3539,13 +3539,13 @@
|
|||
"properties": {
|
||||
"refreshInterval": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": 0,
|
||||
"description": "File/submodule refresh interval in seconds.\nAuto-refresh can be disabled via option 'git.autoRefresh'.",
|
||||
"default": 10
|
||||
},
|
||||
"fetchInterval": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": 0,
|
||||
"description": "Re-fetch interval in seconds.\nAuto-fetch can be disabled via option 'git.autoFetch'.",
|
||||
"default": 60
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue