diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-05-09 21:41:25 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2023-05-16 13:20:03 +0200 |
commit | 46b93bba0eb14f0823cb3571b6b8ad3913ebcc7c (patch) | |
tree | 0cb109291599c17c91db2472a3803052798d2168 /pkg/config | |
parent | d2d50aedd046f3c32f5106c951647240d2f3a777 (diff) |
Add config git.mainBranches
It defaults to {"master", "main"}, but can be set to whatever branch names
are used as base branches, e.g. {"master", "devel", "v1.0-hotfixes"}. It is
used for color-coding the shas in the commit list, i.e. to decide whether
commits are green or yellow.
Diffstat (limited to 'pkg/config')
-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 82361ddbd..9212a2de8 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -76,6 +76,7 @@ type GitConfig struct { Paging PagingConfig `yaml:"paging"` Commit CommitConfig `yaml:"commit"` Merging MergingConfig `yaml:"merging"` + MainBranches []string `yaml:"mainBranches"` SkipHookPrefix string `yaml:"skipHookPrefix"` AutoFetch bool `yaml:"autoFetch"` AutoRefresh bool `yaml:"autoRefresh"` @@ -443,6 +444,7 @@ func GetDefaultConfig() *UserConfig { ShowWholeGraph: false, }, SkipHookPrefix: "WIP", + MainBranches: []string{"master", "main"}, AutoFetch: true, AutoRefresh: true, BranchLogCmd: "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --", |