{"record":{"id":"81c6d758a66777a3","repo":"GitoxideLabs/gitoxide","slug":"traversal-with-date","errorCode":null,"errorMessage":"traversal with date","messagePattern":"traversal with date","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/revision/list.rs","lineNumber":109,"sourceCode":"                    for parent_id in commit.parent_ids() {\n                        let dest = match map.get(parent_id.as_ref()) {\n                            Some(handle) => *handle,\n                            None => {\n                                let dest = vg.add_node(new_node(parent_id));\n                                map.insert(parent_id.detach(), dest);\n                                dest\n                            }\n                        };\n                        let arrow = Arrow::simple(\"\");\n                        vg.add_edge(arrow, source, dest);\n                    }\n                }\n                None => {\n                    writeln!(\n                        out,\n                        \"{} {} {}\",\n                        HexId::new(commit.id(), long_hashes),\n                        commit.commit_time.expect(\"traversal with date\"),\n                        commit.parent_ids.len()\n                    )?;\n                }\n            }\n            progress.inc();\n            if limit.is_some_and(|limit| limit == progress.step()) {\n                break;\n            }\n        }\n\n        progress.show_throughput(start);\n        if let Some((mut vg, path, _)) = vg {\n            let start = std::time::Instant::now();\n            progress.set_name(\"layout graph\".into());\n            progress.info(format!(\"writing {}…\", path.display()));\n            let mut svg = SVGWriter::new();\n            vg.do_it(false, false, false, &mut svg);\n            std::fs::write(&path, svg.finalize().as_bytes())?;","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/revision/list.rs#L91-L127","documentation":"When listing commits in the revision-list CLI, `commit.commit_time` is expected to be `Some` because the traversal was configured with commit-time ordering. The `.expect()` panics if a commit arrives without its commit time set.","triggerScenarios":"Running the revision-list command where traversal is configured to sort by commit date but the returned commit info lacks `commit_time` — an internal inconsistency between traversal setup and consumption.","commonSituations":"A change in gix's traversal API that no longer populates commit_time by default; calling the list function with date-based sorting flags but an outdated traversal configuration.","solutions":["Ensure the traversal is built with commit-time information enabled (e.g. `Sorting::ByCommitTime(...)`) so `commit_time` is populated.","Update to a gix version where commit time is attached when date sorting is requested.","Replace the `.expect()` with a fallback (e.g. print `0`) for robustness."],"exampleFix":"// before\ncommit.commit_time.expect(\"traversal with date\"),\n\n// after\ncommit.commit_time.unwrap_or(0),","handlingStrategy":"try-catch","validationCode":"// configure traversal explicitly\nlet sorting = gix::traverse::commit::Sorting::ByCommitTime(gix::traverse::commit::commit_timegen::Sorting::NewestFirst);","typeGuard":null,"tryCatchPattern":"// guard instead of expect\nlet time = commit.commit_time.unwrap_or_else(|| {\n    eprintln!(\"warning: commit time missing; printing 0\");\n    0\n});","preventionTips":["Enable commit-time collection whenever output includes commit_time","Keep traversal configuration and print format in sync","Upgrade gix when traversal output fields change"],"tags":["cli","panic","traversal","commit-time"],"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"}