{"record":{"id":"5b08d5c8ff45ee98","repo":"gitbutlerapp/gitbutler","slug":"line-line-number-merge-does-not-accept-a-messag","errorCode":null,"errorMessage":"line {line_number}: merge does not accept a message clause","messagePattern":"line (.+?): merge does not accept a message clause","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-workspace/src/branch/integrate_branch_upstream/parsing.rs","lineNumber":62,"sourceCode":"                if message_part.is_some() {\n                    bail!(\"line {line_number}: pick does not accept a message clause\");\n                }\n                if arguments.len() != 1 {\n                    bail!(\"line {line_number}: pick requires exactly one commit\");\n                }\n                let commit = arguments\n                    .first()\n                    .copied()\n                    .expect(\"validated pick arity above\");\n                InteractiveIntegrationStep::Pick {\n                    commit_id: resolve_commit(commit, &allowed_commits).map_err(|err| {\n                        anyhow::anyhow!(\"line {line_number}: invalid pick commit: {err}\")\n                    })?,\n                }\n            }\n            \"merge\" => {\n                if message_part.is_some() {\n                    bail!(\"line {line_number}: merge does not accept a message clause\");\n                }\n                if arguments.len() != 1 {\n                    bail!(\"line {line_number}: merge requires exactly one commit\");\n                }\n                let commit = arguments\n                    .first()\n                    .copied()\n                    .expect(\"validated merge arity above\");\n                InteractiveIntegrationStep::Merge {\n                    commit_id: resolve_commit(commit, &allowed_commits).map_err(|err| {\n                        anyhow::anyhow!(\"line {line_number}: invalid merge commit: {err}\")\n                    })?,\n                }\n            }\n            \"squash\" => {\n                if arguments.len() < 2 {\n                    bail!(\"line {line_number}: squash requires at least two commits\");\n                }","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-workspace/src/branch/integrate_branch_upstream/parsing.rs#L44-L80","documentation":"Raised by `parse_integration_steps_script` when a `merge` line carries a `| message=...` clause. Like pick, merge takes no message; only squash supports the optional message clause.","triggerScenarios":"Script line like `merge 7d1e00f | message=\"merge msg\"`. Any attempt to supply a merge-commit message via the clause hits this bail.","commonSituations":"Hand-editing the integration script and assuming merge (which produces a merge commit) accepts a message parameter; copying a squash line's syntax onto a merge line.","solutions":["Drop the clause: `merge 7d1e00f`.","If a specific merge message is needed, express it via a squash step or set the message after integration with a follow-up amend."],"exampleFix":"# before\nmerge 7d1e00f | message=\"integrate upstream\"\n\n# after\nmerge 7d1e00f","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(err) = parse_integration_steps_script(&script, &divergence) {\n    // message contains 'line {n}: merge does not accept a message clause'\n    highlight_line_in_editor(&err);\n}","preventionTips":["Teach the grammar: message clauses exist only on squash lines.","Round-trip scripts through render/parse to keep them canonical."],"tags":["rust","git","but-workspace","integration","todo-script","parsing"],"backgroundTag":"rebase-todo-parse-error","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}