mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
refactor: use slices.Equal to simplify code
Signed-off-by: jishudashu <979260390@qq.com>
This commit is contained in:
committed by
Stefan Haller
parent
8e04349828
commit
630c1720ac
@ -1,6 +1,7 @@
|
||||
package git_commands
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@ -43,7 +44,7 @@ func (self *MainBranches) Get() []string {
|
||||
|
||||
configuredMainBranches := self.c.UserConfig().Git.MainBranches
|
||||
|
||||
if self.existingMainBranches == nil || !utils.EqualSlices(self.previousMainBranches, configuredMainBranches) {
|
||||
if self.existingMainBranches == nil || !slices.Equal(self.previousMainBranches, configuredMainBranches) {
|
||||
self.existingMainBranches = self.determineMainBranches(configuredMainBranches)
|
||||
self.previousMainBranches = configuredMainBranches
|
||||
}
|
||||
|
Reference in New Issue
Block a user