summaryrefslogtreecommitdiffstats
path: root/pkg/commands/config.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-10-03 14:54:55 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-10-10 00:23:01 +1100
commit4912205adb5e8e245b33b8e0d5581bcf0ec37e8a (patch)
tree90e28657c0af72cd0a880842f88750c01a32834d /pkg/commands/config.go
parent9440dcf9de3214927125693e512cdc941ca4e123 (diff)
remove viper
WIP
Diffstat (limited to 'pkg/commands/config.go')
-rw-r--r--pkg/commands/config.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/commands/config.go b/pkg/commands/config.go
index 018de2724..4e747e32c 100644
--- a/pkg/commands/config.go
+++ b/pkg/commands/config.go
@@ -24,7 +24,7 @@ func (c *GitCommand) ConfiguredPager() string {
}
func (c *GitCommand) GetPager(width int) string {
- useConfig := c.Config.GetUserConfig().GetBool("git.paging.useConfig")
+ useConfig := c.Config.GetUserConfig().Git.Paging.UseConfig
if useConfig {
pager := c.ConfiguredPager()
return strings.Split(pager, "| less")[0]
@@ -34,12 +34,12 @@ func (c *GitCommand) GetPager(width int) string {
"columnWidth": strconv.Itoa(width/2 - 6),
}
- pagerTemplate := c.Config.GetUserConfig().GetString("git.paging.pager")
+ pagerTemplate := c.Config.GetUserConfig().Git.Paging.Pager
return utils.ResolvePlaceholderString(pagerTemplate, templateValues)
}
func (c *GitCommand) colorArg() string {
- return c.Config.GetUserConfig().GetString("git.paging.colorArg")
+ return c.Config.GetUserConfig().Git.Paging.ColorArg
}
func (c *GitCommand) GetConfigValue(key string) string {