{"record":{"id":"c10cace7e859c538","repo":"gitbutlerapp/gitbutler","slug":"line-line-number-unknown-command-other","errorCode":null,"errorMessage":"line {line_number}: unknown command '{other}'","messagePattern":"line (.+?): unknown command '(.+?)'","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-workspace/src/branch/integrate_branch_upstream/parsing.rs","lineNumber":101,"sourceCode":"                    .map(|commit| {\n                        resolve_commit(commit, &allowed_commits).map_err(|err| {\n                            anyhow::anyhow!(\n                                \"line {line_number}: invalid squash commit '{commit}': {err}\"\n                            )\n                        })\n                    })\n                    .collect::<Result<Vec<_>>>()?;\n                InteractiveIntegrationStep::Squash {\n                    commits,\n                    message: message_part\n                        .map(parse_message_clause)\n                        .transpose()\n                        .map_err(|err| {\n                            anyhow::anyhow!(\"line {line_number}: invalid squash message: {err}\")\n                        })?,\n                }\n            }\n            other => bail!(\"line {line_number}: unknown command '{other}'\"),\n        };\n        steps.push(step);\n    }\n\n    Ok(steps)\n}\n\nfn render_step(step: &InteractiveIntegrationStep) -> String {\n    match step {\n        InteractiveIntegrationStep::Pick { commit_id } => format!(\"pick {}\", short_id(*commit_id)),\n        InteractiveIntegrationStep::Merge { commit_id } => {\n            format!(\"merge {}\", short_id(*commit_id))\n        }\n        InteractiveIntegrationStep::Squash { commits, message } => {\n            let mut rendered = format!(\n                \"squash {}\",\n                commits\n                    .iter()","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-workspace/src/branch/integrate_branch_upstream/parsing.rs#L83-L119","documentation":"Raised by `parse_integration_steps_script` when the first token of a non-empty, non-comment line is not `pick`, `merge`, or `squash`. The integration grammar is deliberately much smaller than git rebase's todo grammar; there is no drop/reword/edit/fixup/exec.","triggerScenarios":"Lines like `drop 4f2a9c1`, `reword 4f2a9c1`, `edit 4f2a9c1`, `fixup 4f2a9c1`, `exec make`, or a stray non-comment sentence. Empty lines and lines starting with `#` are skipped, so comments are the only annotation allowed.","commonSituations":"Pasting a `git rebase -i` todo into the integration editor; muscle-memory rebase commands; tools that emit rebase todos reused for this script.","solutions":["Map your intent to the supported verbs: omit lines you don't want (there is no drop — deleting the line drops the commit), use pick/merge/squash only.","Put explanatory text behind a leading `#` so it is treated as a comment.","Re-generate the baseline with `render_integration_steps_script(&initial_steps)` and edit from that."],"exampleFix":"# before\nreword 4f2a9c1\n\n# after\n# (delete the line to skip the commit, or keep it as:)\npick 4f2a9c1","handlingStrategy":"validation","validationCode":"fn is_known_command(cmd: &str) -> bool { matches!(cmd, \"pick\" | \"merge\" | \"squash\") }\n// lint pass before parse:\nfor (i, line) in script.lines().enumerate() {\n    let t = line.trim();\n    if t.is_empty() || t.starts_with('#') { continue; }\n    if let Some(cmd) = t.split_whitespace().next() {\n        if !is_known_command(cmd) { warn_user_line(i + 1, cmd); }\n    }\n}","typeGuard":null,"tryCatchPattern":"if let Err(err) = parse_integration_steps_script(&script, &divergence) {\n    // 'line {n}: unknown command ...' — offer mapping hints (drop -> delete line, reword -> squash message)\n}","preventionTips":["Show the supported verbs (pick/merge/squash) in the editor; comments start with '#'.","Warn when pasted content looks like a git-rebase todo (contains drop/reword/edit/fixup/exec)."],"tags":["rust","git","but-workspace","integration","todo-script","parsing","unknown-command"],"backgroundTag":"rebase-todo-parse-error","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}