{"record":{"id":"88bb5df34c4b51e0","repo":"gitbutlerapp/gitbutler","slug":"unsupported-escape-sequence-other","errorCode":null,"errorMessage":"unsupported escape sequence '\\{other}'","messagePattern":"unsupported escape sequence '\\\\(.+?)'","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/but-workspace/src/branch/integrate_branch_upstream/parsing.rs","lineNumber":194,"sourceCode":"    parse_quoted_string(value)\n}\n\nfn parse_quoted_string(input: &str) -> Result<String> {\n    if !input.starts_with('\"') {\n        bail!(\"message must start with a double quote\");\n    }\n\n    let mut output = String::new();\n    let mut escaped = false;\n    for (index, ch) in input.char_indices().skip(1) {\n        if escaped {\n            let resolved = match ch {\n                '\\\\' => '\\\\',\n                '\"' => '\"',\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    }","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-workspace/src/branch/integrate_branch_upstream/parsing.rs#L176-L212","documentation":"Raised by `parse_quoted_string` when a backslash escape inside a quoted squash message is followed by a character other than the supported set. Only `\\\\`, `\\\"`, `\\n`, `\\r`, `\\t` are recognized.","triggerScenarios":"A message containing e.g. `\\x22`, `\\'`, `\\0`, or a literal backslash before an unrelated char: `| message=\"path C:\\\\temp\"` is fine but `\"\\d+\"` bails.","commonSituations":"Messages with regex snippets, Windows paths written with single backslashes, or JSON-ish content pasted into the message where `\\uXXXX`/`\\x` escapes are expected.","solutions":["Replace the unsupported escape: double the backslash for a literal one (`\\\\`), or remove it.","Keep control characters to the supported set (\\n, \\r, \\t); anything else must be written literally."],"exampleFix":"# before\nsquash 4f2a 991b | message=\"match \\d+ exactly\"\n\n# after\nsquash 4f2a 991b | message=\"match \\\\d+ exactly\"","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(err) = parse_integration_steps_script(&script, &divergence) {\n    if err.to_string().contains(\"unsupported escape sequence\") {\n        // tell user only \\\\ \\\" \\n \\r \\t are allowed\n    }\n}","preventionTips":["Escape backslashes by doubling them; only \\n \\r \\t escapes exist.","Generate messages programmatically instead of hand-typing when they contain backslashes."],"tags":["rust","git","but-workspace","integration","todo-script","parsing","quoting","escape-sequence"],"backgroundTag":"invalid-escape-sequence","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}