{"record":{"id":"145e2eada09438dc","repo":"GitoxideLabs/gitoxide","slug":"this-case-should-have-been-removed-during-processi","errorCode":null,"errorMessage":"this case should have been removed during processing","messagePattern":"this case should have been removed during processing","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-protocol/src/handshake/refs/shared.rs","lineNumber":51,"sourceCode":"                target: None,\n                tag: Some(tag),\n                object,\n            } => Ref::Peeled {\n                full_ref_name: path,\n                tag,\n                object,\n            },\n            InternalRef::Peeled { path, tag, object } => Ref::Peeled {\n                full_ref_name: path,\n                tag,\n                object,\n            },\n            InternalRef::Direct { path, object } => Ref::Direct {\n                full_ref_name: path,\n                object,\n            },\n            InternalRef::SymbolicForLookup { .. } => {\n                unreachable!(\"this case should have been removed during processing\")\n            }\n        }\n    }\n}\n\n#[cfg_attr(test, derive(PartialEq, Eq, Debug, Clone))]\npub(crate) enum InternalRef {\n    /// A ref pointing to a `tag` object, which in turns points to an `object`, usually a commit\n    Peeled {\n        path: BString,\n        tag: gix_hash::ObjectId,\n        object: gix_hash::ObjectId,\n    },\n    /// A ref pointing to a commit object\n    Direct { path: BString, object: gix_hash::ObjectId },\n    /// A symbolic ref pointing to `target` ref, which in turn points to an `object`\n    Symbolic {\n        path: BString,","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-protocol/src/handshake/refs/shared.rs#L33-L69","documentation":"An `unreachable!()` panic in `gix_protocol::handshake::refs::shared::from` while converting internal ref representations into public `Ref` values. `InternalRef::SymbolicForLookup` is a temporary marker expected to be consumed during earlier processing; the panic fires if one survives into the final conversion, meaning the parse/filter pipeline left stale temporary refs behind.","triggerScenarios":"Calling the handshake refs conversion (`from`) on a v0/v1 or v2 ref advertisement where the earlier `parse_*` stage did not resolve or remove all `SymbolicForLookup` entries — e.g. a remote advertisement with a symbolic ref (like `HEAD`) that the lookup pass failed to process, indicating a bug in the parsing pipeline.","commonSituations":"Cloning/fetching from servers that advertise symbolic refs in unusual positions or with unusual ordering (custom Git servers, proxies), or using a gix version with an incomplete symbolic-ref resolution step; typically reported as an upstream bug.","solutions":["Upgrade gix / gix-protocol to the latest version and retry the clone/fetch","Compare behavior against real `git ls-remote` on the same URL; if the advertisement is malformed, fix or avoid the server","File an upstream issue with the server software/version and a capture of the ref advertisement"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"std::panic::catch_unwind(|| handshake_and_list_refs(conn))\n    .map_err(|_| \"internal refs-conversion invariant violated; use git ls-remote fallback\")?","preventionTips":["Prefer protocol v2 transports when talking to custom Git servers","Check unusual servers with real `git ls-remote` before ingesting them with gix","Keep gix-protocol updated; symbolic-ref handling bugs are fixed in releases","Avoid custom server implementations that reorder or duplicate symbolic refs"],"tags":["rust","panic","handshake","refs","protocol"],"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"}