Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pkg/commands/git_commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ func (self *ConfigCommands) Branches() (map[string]*config.Branch, error) {
return nil, err
}

return conf.Branches, nil
// Filter out branches with empty names to handle edge cases where
// .git/config has [branch ""] sections
filteredBranches := make(map[string]*config.Branch)
for name, branch := range conf.Branches {
if name != "" {
filteredBranches[name] = branch
}
}

return filteredBranches, nil
}

func (self *ConfigCommands) GetGitFlowPrefixes() string {
Expand Down