1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-25 22:01:14 +02:00

Merge pull request from mjarkk/fix-1385

branches check for split parts length
This commit is contained in:
Mark Kopenga 2021-07-26 11:22:33 +02:00 committed by GitHub
commit f4874bbb74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -52,6 +52,12 @@ func (b *BranchListBuilder) obtainBranches() []*models.Branch {
}
split := strings.Split(line, SEPARATION_CHAR)
if len(split) != 4 {
// Ignore line if it isn't separated into 4 parts
// This is probably a warning message, for more info see:
// https://github.com/jesseduffield/lazygit/issues/1385#issuecomment-885580439
continue
}
name := strings.TrimPrefix(split[1], "heads/")
branch := &models.Branch{