diff --git a/pkg/commands/git_commands/config.go b/pkg/commands/git_commands/config.go index ef463e3f6..a72fe504c 100644 --- a/pkg/commands/git_commands/config.go +++ b/pkg/commands/git_commands/config.go @@ -93,7 +93,8 @@ func (self *ConfigCommands) Branches(cmd oscommands.ICmdObjBuilder) map[string]* } // key is like "branch..remote" or "branch..merge" lastDot := strings.LastIndex(key, ".") - if lastDot < 0 { + // ignore key like branch.autosetuprebase + if lastDot < len("branch.") { continue } configKey := key[lastDot+1:]