summaryrefslogtreecommitdiffstats
path: root/pkg/config
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-11-02 20:05:23 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-11-05 07:58:21 +1100
commitf6ec7babf55c4a43bc8048e8a84970a8de8250b9 (patch)
treeffbfe8d8085feac9c69d1c29a1e44eff8e8ddb3a /pkg/config
parent802cfb1a0436568c72fc998249f10f8150b352a3 (diff)
add some config
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/user_config.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go
index 485746c0f..4ded99304 100644
--- a/pkg/config/user_config.go
+++ b/pkg/config/user_config.go
@@ -69,7 +69,9 @@ type GitConfig struct {
OverrideGpg bool `yaml:"overrideGpg"`
DisableForcePushing bool `yaml:"disableForcePushing"`
CommitPrefixes map[string]CommitPrefixConfig `yaml:"commitPrefixes"`
- ParseEmoji bool `yaml:"parseEmoji"`
+ // this shoudl really be under 'gui', not 'git'
+ ParseEmoji bool `yaml:"parseEmoji"`
+ Log LogConfig `yaml:"log"`
}
type PagingConfig struct {
@@ -83,6 +85,11 @@ type MergingConfig struct {
Args string `yaml:"args"`
}
+type LogConfig struct {
+ Order string `yaml:"order"` // one of date-order, reverse, author-date-order, topo-order
+ ShowGraph string `yaml:"showGraph"` // one of always, never, when-maximised
+}
+
type CommitPrefixConfig struct {
Pattern string `yaml:"pattern"`
Replace string `yaml:"replace"`
@@ -338,6 +345,10 @@ func GetDefaultConfig() *UserConfig {
ManualCommit: false,
Args: "",
},
+ Log: LogConfig{
+ Order: "topo-order",
+ ShowGraph: "when-maximised",
+ },
SkipHookPrefix: "WIP",
AutoFetch: true,
BranchLogCmd: "git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --",