{"record":{"id":"c0d7520ca2e17151","repo":"GitoxideLabs/gitoxide","slug":"unknown-commit-header","errorCode":null,"errorMessage":"unknown commit header: {}","messagePattern":"unknown commit header: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/edit/reword.rs","lineNumber":389,"sourceCode":"            message_offset = Some(consumed);\n            break;\n        }\n        if line.starts_with(comment_char) {\n            continue;\n        }\n        if line == TODO {\n            if std::mem::replace(&mut todo_seen, true) {\n                anyhow::bail!(\"duplicate Todo header\");\n            }\n            enrichment.todo = true;\n        } else if let Some(title) = line.strip_prefix(MESSAGE) {\n            if std::mem::replace(&mut message_seen, true) {\n                anyhow::bail!(\"duplicate Message header\");\n            }\n            let title = title.trim();\n            enrichment.message = (!title.is_empty()).then(|| title.into());\n        } else {\n            anyhow::bail!(\"unknown commit header: {}\", line.as_bstr());\n        }\n    }\n    let message_offset = message_offset.context(\"expected an empty line after the commit headers\")?;\n    let message = cleanup_message(\n        remainder\n            .get(message_offset..)\n            .context(\"the commit message is missing\")?,\n        Some(comment_char),\n    );\n    Ok(Edit {\n        author,\n        author_time,\n        committer,\n        committer_time,\n        message,\n        enrichment,\n    })\n}","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/edit/reword.rs#L371-L407","documentation":"After the fixed enrichment headers, every remaining header-position line must be a recognized `Todo` or `Message` line. Any other non-comment line before the blank separator is rejected by `parse` with this error, echoing the offending line, to prevent silently misinterpreting malformed documents.","triggerScenarios":"Calling `parse` on a document where a line in the header section is neither a comment (per CommentChar), `Todo`, nor the `MESSAGE` prefix — e.g. a stray `pick` line, a typo like `Mesage:`, or a header written before its expected position.","commonSituations":"Hand-edited documents with typos; older/newer document formats mixed after a version change; tools inserting their own headers into the enrichment block.","solutions":["Remove or fix the unrecognized line so only `Todo`/`Message` headers (and comments) appear before the blank line.","Check the line for typos against the expected header names.","Regenerate the document with `document()` if its structure is unclear or from another tool version."],"exampleFix":"// before\nTodo\nMesage: typo header\npick abc123 msg\n// after\nTodo\npick abc123 msg","handlingStrategy":"validation","validationCode":"fn header_line_known(line: &[u8]) -> bool {\n    line == TODO || line.starts_with(MESSAGE)\n}","typeGuard":null,"tryCatchPattern":"match parse(&edited) {\n    Ok(doc) => doc,\n    Err(e) if e.to_string().starts_with(\"unknown commit header\") => {\n        eprintln!(\"Edit document contains an unrecognized header line; fix or regenerate it.\");\n        Err(e)\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Keep only recognized headers before the blank separator line.","Check spelling of header names after manual edits.","Regenerate the document after upgrading tool versions that may change the format."],"tags":["git","parsing","validation","unknown-header","format"],"backgroundTag":"schema-validation-failed","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}