{"record":{"id":"2b575f621401a4cc","repo":"jesseduffield/lazygit","slug":"you-should-have-an-allbrancheslogcmds-defined-as-a","errorCode":null,"errorMessage":"You should have an allBranchesLogCmds defined as a sequence!","messagePattern":"You should have an allBranchesLogCmds defined as a sequence!","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/app_config.go","lineNumber":507,"sourceCode":"\t\t\treturn nil\n\t\t}\n\n\t\tcmdsKeyNode, cmdsValueNode := yaml_utils.LookupKey(gitNode, \"allBranchesLogCmds\")\n\t\tvar change string\n\t\tif cmdsKeyNode == nil {\n\t\t\t// Create empty sequence node and attach it onto the root git node\n\t\t\t// We will later populate it with the individual allBranchesLogCmd record\n\t\t\tcmdsKeyNode = &yaml.Node{Kind: yaml.ScalarNode, Value: \"allBranchesLogCmds\"}\n\t\t\tcmdsValueNode = &yaml.Node{Kind: yaml.SequenceNode, Content: []*yaml.Node{}}\n\t\t\tgitNode.Content = append(\n\t\t\t\tgitNode.Content,\n\t\t\t\tcmdsKeyNode,\n\t\t\t\tcmdsValueNode,\n\t\t\t)\n\t\t\tchange = \"Created git.allBranchesLogCmds array containing value of git.allBranchesLogCmd\"\n\t\t} else {\n\t\t\tif cmdsValueNode.Kind != yaml.SequenceNode {\n\t\t\t\treturn errors.New(\"You should have an allBranchesLogCmds defined as a sequence!\")\n\t\t\t}\n\n\t\t\tchange = \"Prepended git.allBranchesLogCmd value to git.allBranchesLogCmds array\"\n\t\t}\n\n\t\tif cmdValueNode.Value != \"\" {\n\t\t\t// Prepending the individual element to make it show up first in the list, which was prior behavior\n\t\t\tcmdsValueNode.Content = utils.Prepend(cmdsValueNode.Content, &yaml.Node{Kind: yaml.ScalarNode, Value: cmdValueNode.Value})\n\t\t\tchanges.Add(change)\n\t\t}\n\n\t\t// Clear out the existing allBranchesLogCmd, now that we have migrated it into the list\n\t\t_, _ = yaml_utils.RemoveKey(gitNode, \"allBranchesLogCmd\")\n\t\tchanges.Add(\"Removed obsolete git.allBranchesLogCmd\")\n\n\t\treturn nil\n\t})\n}","sourceCodeStart":489,"sourceCodeEnd":525,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/config/app_config.go#L489-L525","documentation":"Thrown during the git.allBranchesLogCmd -> git.allBranchesLogCmds config migration in pkg/config/app_config.go:507. After locating the existing allBranchesLogCmds node, its YAML node Kind is not a SequenceNode — i.e. the user's config has allBranchesLogCmds as a scalar or mapping instead of a list — so the old scalar value cannot be prepended into it.","triggerScenarios":"A user config where 'git: allBranchesLogCmds:' is defined as a string (e.g. copied from old docs that used the singular key with a plural list key name) or as a nested map, combined with also having allBranchesLogCmd set, triggering the migration path that requires a sequence.","commonSituations":"Hand-edited config.yml where the plural key was given a scalar value; configs shared between lazygit versions; snippets pasted from outdated documentation.","solutions":["Edit ~/.config/lazygit/config.yml and make git.allBranchesLogCmds a YAML sequence, e.g. 'allBranchesLogCmds:\\n  - git log ...'","Or remove git.allBranchesLogCmds entirely and keep only the old allBranchesLogCmd so the migration creates the sequence itself","Validate the file parses as intended with a YAML linter, then restart lazygit"],"exampleFix":"# before (config.yml)\ngit:\n  allBranchesLogCmd: git log --graph --all\n  allBranchesLogCmds: git log --graph --all  # scalar: triggers error\n\n# after\ngit:\n  allBranchesLogCmds:\n    - git log --graph --all --color=always","handlingStrategy":"validation","validationCode":"# Pre-validate before launch: every allBranchesLogCmds must be a YAML sequence\ngit -c alias.check='!f() { yq \".git.allBranchesLogCmds | type == \\\"!!seq\\\"\" ~/.config/lazygit/config.yml; }; f' check","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use list syntax for all *Cmds config keys — they are all sequences","Copy config examples from the current docs-master, not old gists","Lint config.yml with yamllint after hand edits"],"tags":["config","yaml","migration"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}