{"record":{"id":"f3eaeca01241ca70","repo":"zed-industries/zed","slug":"git-log-failed","errorCode":null,"errorMessage":"git log failed:\n{}","messagePattern":"git log failed:\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/git/src/repository.rs","lineNumber":3480,"sourceCode":"                args.push(\"--fixed-strings\");\n\n                if !search_args.case_sensitive {\n                    args.push(\"--regexp-ignore-case\");\n                }\n\n                args.push(\"--grep\");\n                args.push(search_args.query.as_str());\n            }\n\n            args.extend(log_source_args.iter().map(|arg| arg.as_ref()));\n            let mut command = git.build_command(&args);\n            command.stdout(Stdio::piped());\n            command.stderr(Stdio::null());\n\n            let mut child = command.spawn()?;\n            let stdout = child.stdout.take().context(\"failed to get stdout\")?;\n            let mut reader = BufReader::new(stdout);\n\n            let mut line_buffer = String::new();\n\n            loop {\n                line_buffer.clear();\n                let bytes_read = reader.read_line(&mut line_buffer).await?;\n\n                if bytes_read == 0 {\n                    break;\n                }\n\n                let sha = line_buffer.trim_end_matches('\\n');\n                if let Some(hash_query) = hash_query.as_ref()\n                    && !sha.to_ascii_lowercase().starts_with(hash_query)\n                {\n                    continue;\n                }\n\n                if let Ok(oid) = Oid::from_str(sha)","sourceCodeStart":3462,"sourceCodeEnd":3498,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/git/src/repository.rs#L3462-L3498","documentation":"ensure! guard failing when `git log --full-diff --name-only -z --format=%x1e -- <paths>` exits non-zero while loading per-file commit history. Fires for invalid pathspecs, missing HEAD in an empty repo, or corrupt object data.","triggerScenarios":"Thrown at crates/git/src/repository.rs:3466 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check git stderr for a bad pathspec or missing revision","Handle empty repositories (no commits yet) by returning no history instead of erroring","Verify the requested paths exist or existed in the repo","Retry after repository state stabilizes (e.g. mid-rebase)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}