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:
Stefan Haller 2026-05-30 16:43:10 +02:00
parent fcaf1512bd
commit 04d62e072b
2 changed files with 4 additions and 4 deletions

View file

@ -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 {

View file

@ -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
}