{"record":{"id":"e8563697018e9863","repo":"zed-industries/zed","slug":"git-command-failed-n-stdout-stderr-n","errorCode":null,"errorMessage":"Git command failed:\\n{stdout}{stderr}\\n","messagePattern":"Git command failed:\\\\n(.+?)(.+?)\\\\n","errorType":"exception","errorClass":"GitBinaryCommandError","httpStatus":null,"severity":"error","filePath":"crates/git/src/repository.rs","lineNumber":1559,"sourceCode":"                        .await?;\n                let is_binary = new_object.as_ref().is_some_and(|object| object.is_binary)\n                    || old_object.as_ref().is_some_and(|object| object.is_binary);\n                let new_content = new_object.map(|object| object.content);\n                let old_content = old_object.map(|object| object.content);\n\n                files.push(CommitFile {\n                    path: RepoPath(Arc::from(rel_path)),\n                    old_content,\n                    new_content,\n                    is_binary,\n                })\n            }\n\n            Ok(CommitDiff {\n                files,\n                is_shallow_boundary: false,\n            })\n        })\n        .boxed()\n    }\n\n    fn reset(\n        &self,\n        commit: String,\n        mode: ResetMode,\n        env: Arc<HashMap<String, String>>,\n    ) -> BoxFuture<'_, Result<()>> {\n        let git = self.git_binary_in_worktree();\n        async move {\n            let git = git?;\n            let mode_flag = match mode {\n                ResetMode::Mixed => \"--mixed\",\n                ResetMode::Soft => \"--soft\",\n            };\n\n            let output = git","sourceCodeStart":1541,"sourceCodeEnd":1577,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/git/src/repository.rs#L1541-L1577","documentation":"A spawned git subprocess (e.g. 'git cat-file blob' in load_blob_content) completed but exited non-zero; the message embeds the command's combined stdout and stderr. This is the generic guard for git child-process failure in repository.rs — the specific git error text in {stdout}{stderr} identifies the root cause (missing object, lock contention, repo corruption).","triggerScenarios":"Thrown at crates/git/src/repository.rs:1548 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded stdout/stderr to identify git's own diagnosis before acting","For cat-file blob failures, verify the oid exists ('git cat-file -e') — a pruned/gc'd object is a common cause","Retry transient failures (index.lock, remote operations) with a short backoff"],"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"}