1
0
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:
Stefan Haller
2024-07-30 19:38:36 +02:00
parent 3d6d677453
commit fd8e480363
2 changed files with 23 additions and 4 deletions

View File

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