{"record":{"id":"2995625d07ffdf2d","repo":"gitbutlerapp/gitbutler","slug":"unexpected-trailing-characters-after-quoted-messag","errorCode":null,"errorMessage":"unexpected trailing characters after quoted message","messagePattern":"unexpected trailing characters after quoted message","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-workspace/src/branch/integrate_branch_upstream/parsing.rs","lineNumber":208,"sourceCode":"                '\"' => '\"',\n                'n' => '\\n',\n                'r' => '\\r',\n                't' => '\\t',\n                other => bail!(\"unsupported escape sequence '\\\\{other}'\"),\n            };\n            output.push(resolved);\n            escaped = false;\n            continue;\n        }\n\n        match ch {\n            '\\\\' => escaped = true,\n            '\"' => {\n                let trailing = input[index + ch.len_utf8()..].trim();\n                if trailing.is_empty() {\n                    return Ok(output);\n                }\n                bail!(\"unexpected trailing characters after quoted message\");\n            }\n            other => output.push(other),\n        }\n    }\n\n    if escaped {\n        bail!(\"unterminated escape sequence in quoted message\");\n    }\n    bail!(\"unterminated quoted message\")\n}\n\nfn quote_message(message: &str) -> String {\n    let mut out = String::from(\"\\\"\");\n    for ch in message.chars() {\n        match ch {\n            '\\\\' => out.push_str(\"\\\\\\\\\"),\n            '\"' => out.push_str(\"\\\\\\\"\"),\n            '\\n' => out.push_str(\"\\\\n\"),","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-workspace/src/branch/integrate_branch_upstream/parsing.rs#L190-L226","documentation":"Raised by `parse_quoted_string` when the closing double quote is followed by non-whitespace text. After the terminating quote only trailing whitespace may remain on the message clause.","triggerScenarios":"Lines like `| message=\"done\" extra` or `| message=\"a\" \"b\"` — anything after the closing quote that is not blank.","commonSituations":"Two messages appended; a stray character or second quoted segment after the message; UI concatenation bugs gluing text after the quote.","solutions":["End the line right after the closing quote: `| message=\"done\"`.","If multiple messages were intended, merge them into one quoted string."],"exampleFix":"# before\nsquash 4f2a 991b | message=\"done\" (final)\n\n# after\nsquash 4f2a 991b | message=\"done (final)\"","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(err) = parse_integration_steps_script(&script, &divergence) {\n    // 'unexpected trailing characters after quoted message' — point at text after the closing quote\n}","preventionTips":["Keep the message clause last on the line; nothing may follow the closing quote.","Merge multiple intended messages into one quoted string."],"tags":["rust","git","but-workspace","integration","todo-script","parsing","quoting"],"backgroundTag":"unterminated-string-literal","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}