diff options
author | Robert Verst <robert@verst.eu> | 2021-05-31 18:15:02 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-06-05 10:56:46 +1000 |
commit | 94b52af661dd8b61c60b5801106025e4a81be7b6 (patch) | |
tree | 25a28652de915b4a1cf6c8f5ca5c120424dfd168 | |
parent | 472288c81b3ad48dc86e5a8538c11c7a18e6a604 (diff) |
Remove config, make default sort order `descending`
-rw-r--r-- | docs/Config.md | 1 | ||||
-rw-r--r-- | pkg/commands/loading_tags.go | 4 | ||||
-rw-r--r-- | pkg/config/user_config.go | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/docs/Config.md b/docs/Config.md index c322f2e87..c37747dbe 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -44,7 +44,6 @@ gui: showRandomTip: true showCommandLog: true commandLogSize: 8 - sortTagsDescending: false # sort order for tags git: paging: colorArg: always diff --git a/pkg/commands/loading_tags.go b/pkg/commands/loading_tags.go index 21925f184..8bd66c936 100644 --- a/pkg/commands/loading_tags.go +++ b/pkg/commands/loading_tags.go @@ -46,8 +46,8 @@ func (c *GitCommand) GetTags() ([]*models.Tag, error) { // now lets sort our tags by name numerically re := regexp.MustCompile(semverRegex) - sortAsc := !c.Config.GetUserConfig().Gui.SortTagsDescending - // the reason this is complicated is because we're both sorting alphabetically + sortAsc := c.Config.GetUserConfig().Gui.SortTagsAscending + // the reason this is complicated is because we're both sorting alphabetically // and when we're dealing with semver strings sort.Slice(tags, func(i, j int) bool { var a, b string diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 528830874..074dcbc63 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -39,7 +39,7 @@ type GuiConfig struct { ShowRandomTip bool `yaml:"showRandomTip"` ShowCommandLog bool `yaml:"showCommandLog"` CommandLogSize int `yaml:"commandLogSize"` - SortTagsDescending bool `yaml:"sortTagsDescending"` + SortTagsAscending bool `yaml:"sortTagsAscending"` } type ThemeConfig struct { @@ -308,7 +308,7 @@ func GetDefaultConfig() *UserConfig { ShowFileTree: false, ShowRandomTip: true, CommandLogSize: 8, - SortTagsDescending: false, + SortTagsAscending: false, }, Git: GitConfig{ Paging: PagingConfig{ |