mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Re-determine existing main branches if mainBranches config changed
This commit is contained in:
@ -179,3 +179,18 @@ func Shift[T any](slice []T) (T, []T) {
|
||||
slice = slice[1:]
|
||||
return value, slice
|
||||
}
|
||||
|
||||
// Compares two slices for equality
|
||||
func EqualSlices[T comparable](slice1 []T, slice2 []T) bool {
|
||||
if len(slice1) != len(slice2) {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := range slice1 {
|
||||
if slice1[i] != slice2[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user