1
0
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:
jishudashu
2025-07-24 11:30:00 +08:00
committed by Stefan Haller
parent 8e04349828
commit 630c1720ac
2 changed files with 2 additions and 16 deletions

View File

@ -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
}