{"record":{"id":"641fa2d0b9970543","repo":"GitoxideLabs/gitoxide","slug":"file-based-lookup-isn-t-yet-implemented-in-a-way-t","errorCode":null,"errorMessage":"File-based lookup isn't yet implemented in a way that is competitively fast","messagePattern":"File-based lookup isn't yet implemented in a way that is competitively fast","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/log.rs","lineNumber":29,"sourceCode":"    }\n}\n\nfn log_all(repo: gix::Repository, out: &mut dyn std::io::Write) -> Result<(), anyhow::Error> {\n    let head = repo.head()?.peel_to_commit()?;\n    let topo = gix::traverse::commit::topo::Builder::from_iters(&repo.objects, [head.id], None::<Vec<gix::ObjectId>>)\n        .build()?;\n\n    for info in topo {\n        let info = info?;\n\n        write_info(&repo, &mut *out, &info)?;\n    }\n\n    Ok(())\n}\n\nfn log_file(_repo: gix::Repository, _out: &mut dyn std::io::Write, _path: BString) -> anyhow::Result<()> {\n    bail!(\"File-based lookup isn't yet implemented in a way that is competitively fast\");\n}\n\nfn write_info(\n    repo: &gix::Repository,\n    mut out: impl std::io::Write,\n    info: &gix::traverse::commit::Info,\n) -> Result<(), std::io::Error> {\n    let commit = repo.find_commit(info.id).unwrap();\n\n    let message = commit.message_raw_sloppy();\n    let title = message.lines().next();\n\n    writeln!(\n        out,\n        \"{} {}\",\n        info.id.to_hex_with_len(8),\n        title.map_or_else(|| \"<no message>\".into(), BString::from)\n    )?;","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/log.rs#L11-L47","documentation":"`gix log` on a file path is unimplemented: the `log_file` helper is a stub that unconditionally raises this message. Gitoxide has not yet implemented a competitively fast file-based history lookup (equivalent of `git log <path>`), so the feature is explicitly disabled rather than being slow.","triggerScenarios":"Calling `gix log` (the `log` entrypoint) with a file path argument, which routes to `log_file` and always fails regardless of repository state.","commonSituations":"Trying to view per-file history via the CLI to replicate `git log -- path/to/file`; scripting history queries over specific files; comparing gitoxide output against git for file histories.","solutions":["Use the `git log -- <path>` command from real git instead","Track upstream gitoxide for file-based log implementation and upgrade","Implement the needed history traversal via the gix library API directly (e.g. commit-graph traversal with tree diffs)"],"exampleFix":"// before\n$ gix log -- src/main.rs\n// after\n$ git log -- src/main.rs","handlingStrategy":"fallback","validationCode":"// no way to detect beforehand; the whole subcommand is a stub","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"File-based lookup isn't yet implemented\") =>\n        fallback_to_git_cli(\"log\", &[\"--\", path]),\n    other => other?,\n}\n","preventionTips":["Do not use `gix log <path>` for per-file history; use git","Check gitoxide feature status before adopting subcommands in scripts"],"tags":["unimplemented","cli","git-log"],"backgroundTag":"method-not-implemented","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"}