mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-17 01:42:45 +02:00
Merge pull request #1396 from mjarkk/fix-1385
branches check for split parts length
This commit is contained in:
@ -52,6 +52,12 @@ func (b *BranchListBuilder) obtainBranches() []*models.Branch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
split := strings.Split(line, SEPARATION_CHAR)
|
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/")
|
name := strings.TrimPrefix(split[1], "heads/")
|
||||||
branch := &models.Branch{
|
branch := &models.Branch{
|
||||||
|
Reference in New Issue
Block a user