{"record":{"id":"34d9885e311f8513","repo":"GitoxideLabs/gitoxide","slug":"bug-resolvedsignatures-don-t-exist-here-when-noth","errorCode":null,"errorMessage":"BUG: ResolvedSignatures don't exist here when nothing is set","messagePattern":"BUG: ResolvedSignatures don't exist here when nothing is set","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gix-mailmap/src/snapshot/mod.rs","lineNumber":176,"sourceCode":"    new: ResolvedSignature<'_>,\n) -> Signature<'a> {\n    match (new.email, new.name) {\n        (Some(new_email), Some(new_name)) => Signature {\n            email: new_email.to_owned().into(),\n            name: new_name.to_owned().into(),\n            time: time.parse().unwrap_or_default(),\n        },\n        (Some(new_email), None) => Signature {\n            email: new_email.to_owned().into(),\n            name: name.into(),\n            time: time.parse().unwrap_or_default(),\n        },\n        (None, Some(new_name)) => Signature {\n            email: email.into(),\n            name: new_name.to_owned().into(),\n            time: time.parse().unwrap_or_default(),\n        },\n        (None, None) => unreachable!(\"BUG: ResolvedSignatures don't exist here when nothing is set\"),\n    }\n}\n","sourceCodeStart":158,"sourceCodeEnd":179,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-mailmap/src/snapshot/mod.rs#L158-L179","documentation":"`gix_mailmap`'s `enriched_signature()` computes a new signature from optional replacement name/email pairs. The library panics because the function is only ever invoked after `try_resolve`/`resolve_cow` matched at least one mailmap entry, so at least one of name/email must be `Some`; a `(None, None)` result would mean the internal `ResolvedSignatures` state was constructed incorrectly.","triggerScenarios":"Not reachable from public APIs: it fires only if the mailmap matching layer produces a resolution record where both the replacement name and replacement email are `None`, which its constructors forbid.","commonSituations":"Seen only during gix-mailmap internal development or when deserializing/constructing `ResolvedSignatures` by hand with empty fields instead of using the proper constructor.","solutions":["Construct resolution state via the public `Snapshot`/`Signatures` APIs rather than building `ResolvedSignatures` manually.","Ensure mailmap entries parsed from `.mailmap` are non-empty; empty entries should be skipped at parse time.","Report upstream with a reproducing `.mailmap` and input signature if this is ever hit through normal `Snapshot::resolve` usage."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure mailmap resolution state always carries at least one replacement\nif name_replacement.is_none() && email_replacement.is_none() {\n    return Err(anyhow::anyhow!(\"mailmap resolution produced empty replacement\"));\n}","typeGuard":"fn has_any_replacement(sig: &ResolvedSignatures) -> bool {\n    sig.new_name.is_some() || sig.new_email.is_some()\n}","tryCatchPattern":null,"preventionTips":["Build mailmap state only through public `Snapshot` constructors.","Skip empty mailmap entries at parse time.","Treat any occurrence as an upstream bug and include the `.mailmap` input in the report."],"tags":["panic","git","mailmap","internal-invariant"],"backgroundTag":"internal-invariant-violation","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}