diff options
author | Moritz Haase <Moritz.Haase@bmw.de> | 2022-03-26 18:10:58 +0100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-27 10:14:33 +1100 |
commit | 240483953f708f538b3396fa9e21069c1461137c (patch) | |
tree | b41fdcc02e1b128ea5d4cdd6374a5e4f48829f05 /pkg/config/user_config.go | |
parent | 51baa8c17dddd59b4640aec10758dafb586a612e (diff) |
config: Add option 'git.autoRefresh' to en-/disable auto-refresh
Adds a new 'autoRefresh' option to the 'git' config section that allows user to
disable auto-refresh (defaults to on). If auto-refresh is enabled, the
refreshInterval is now checked before starting the timer to prevent crashes when
it is non-positive.
Fixes #1417
Diffstat (limited to 'pkg/config/user_config.go')
-rw-r--r-- | pkg/config/user_config.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 988673f1e..321a7fa5e 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -68,6 +68,7 @@ type GitConfig struct { Merging MergingConfig `yaml:"merging"` SkipHookPrefix string `yaml:"skipHookPrefix"` AutoFetch bool `yaml:"autoFetch"` + AutoRefresh bool `yaml:"autoRefresh"` BranchLogCmd string `yaml:"branchLogCmd"` AllBranchesLogCmd string `yaml:"allBranchesLogCmd"` OverrideGpg bool `yaml:"overrideGpg"` @@ -373,6 +374,7 @@ func GetDefaultConfig() *UserConfig { }, SkipHookPrefix: "WIP", AutoFetch: true, + AutoRefresh: true, BranchLogCmd: "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --", AllBranchesLogCmd: "git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium", DisableForcePushing: false, |