summaryrefslogtreecommitdiffstats
path: root/pkg/config
diff options
context:
space:
mode:
authorMoritz Haase <Moritz.Haase@bmw.de>2022-03-26 18:10:58 +0100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-27 10:14:33 +1100
commit240483953f708f538b3396fa9e21069c1461137c (patch)
treeb41fdcc02e1b128ea5d4cdd6374a5e4f48829f05 /pkg/config
parent51baa8c17dddd59b4640aec10758dafb586a612e (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')
-rw-r--r--pkg/config/user_config.go2
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,