mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-15 01:34:26 +02:00
Remove config, make default sort order descending
This commit is contained in:
committed by
Jesse Duffield
parent
472288c81b
commit
94b52af661
@ -44,7 +44,6 @@ gui:
|
|||||||
showRandomTip: true
|
showRandomTip: true
|
||||||
showCommandLog: true
|
showCommandLog: true
|
||||||
commandLogSize: 8
|
commandLogSize: 8
|
||||||
sortTagsDescending: false # sort order for tags
|
|
||||||
git:
|
git:
|
||||||
paging:
|
paging:
|
||||||
colorArg: always
|
colorArg: always
|
||||||
|
@ -46,8 +46,8 @@ func (c *GitCommand) GetTags() ([]*models.Tag, error) {
|
|||||||
// now lets sort our tags by name numerically
|
// now lets sort our tags by name numerically
|
||||||
re := regexp.MustCompile(semverRegex)
|
re := regexp.MustCompile(semverRegex)
|
||||||
|
|
||||||
sortAsc := !c.Config.GetUserConfig().Gui.SortTagsDescending
|
sortAsc := c.Config.GetUserConfig().Gui.SortTagsAscending
|
||||||
// the reason this is complicated is because we're both sorting alphabetically
|
// the reason this is complicated is because we're both sorting alphabetically
|
||||||
// and when we're dealing with semver strings
|
// and when we're dealing with semver strings
|
||||||
sort.Slice(tags, func(i, j int) bool {
|
sort.Slice(tags, func(i, j int) bool {
|
||||||
var a, b string
|
var a, b string
|
||||||
|
@ -39,7 +39,7 @@ type GuiConfig struct {
|
|||||||
ShowRandomTip bool `yaml:"showRandomTip"`
|
ShowRandomTip bool `yaml:"showRandomTip"`
|
||||||
ShowCommandLog bool `yaml:"showCommandLog"`
|
ShowCommandLog bool `yaml:"showCommandLog"`
|
||||||
CommandLogSize int `yaml:"commandLogSize"`
|
CommandLogSize int `yaml:"commandLogSize"`
|
||||||
SortTagsDescending bool `yaml:"sortTagsDescending"`
|
SortTagsAscending bool `yaml:"sortTagsAscending"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ThemeConfig struct {
|
type ThemeConfig struct {
|
||||||
@ -308,7 +308,7 @@ func GetDefaultConfig() *UserConfig {
|
|||||||
ShowFileTree: false,
|
ShowFileTree: false,
|
||||||
ShowRandomTip: true,
|
ShowRandomTip: true,
|
||||||
CommandLogSize: 8,
|
CommandLogSize: 8,
|
||||||
SortTagsDescending: false,
|
SortTagsAscending: false,
|
||||||
},
|
},
|
||||||
Git: GitConfig{
|
Git: GitConfig{
|
||||||
Paging: PagingConfig{
|
Paging: PagingConfig{
|
||||||
|
Reference in New Issue
Block a user