zed-industries/zed · error
git log command failed with {}
Error message
git log command failed with {} What it means
A streamed `git log` child process exited non-zero and stderr was empty or could not be read (the stderr read failure is only logged), so only the process exit status is reported. This shape — failure with no stderr — usually means the process was killed by a signal rather than git printing an error.
Source
Thrown at crates/git/src/repository.rs:3374
}
.into());
}
}
return Ok(());
}
if git_binary.is_trusted {
let git_binary = git_binary.envs(HashMap::clone(&env));
git_binary
.run(&["hook", "run", "--ignore-missing", hook.as_str()])
.await?;
}
Ok(())
}
.boxed()
}
fn initial_graph_data(
&self,
log_source: LogSource,
log_order: LogOrder,
request_tx: Sender<Vec<Arc<InitialGraphCommitData>>>,
) -> BoxFuture<'_, Result<()>> {
let git = self.git_binary();
async move {
let log_source_args = log_source.get_args();
let mut git_log_command = vec!["log", GRAPH_COMMIT_FORMAT, log_order.as_arg()];
git_log_command.extend(log_source_args.iter().map(|arg| arg.as_ref()));
let mut command = git.build_command(&git_log_command);
command.stdout(Stdio::piped());
command.stderr(Stdio::piped());
let mut child = command.spawn()?;
let stdout = child.stdout.take().context("failed to get stdout")?;View on GitHub (pinned to 5a9b9558db)
Solutions
- Retry once: signal kills and transient resource exhaustion are the most common silent exits.
- Inspect the reported status: `signal: N (SIGKILL)` points to an external kill, while an exit code points to git itself.
- Reproduce by running the same `git log` arguments manually to see whether any stderr appears.
- If SIGKILL recurs, check system logs for OOM or sandbox kills and reduce the scan scope.
Defensive patterns
Strategy: retry
Try / catch
match log_result {
Err(e) if e.to_string().contains("git log command failed with")
&& e.to_string().contains("signal") =>
{
// process was killed (OOM/sandbox): safe to retry once with a narrower scope
}
other => other?,
} Prevention
- Watch child process memory when streaming history of huge repos; narrow the scope instead of scanning everything.
- Do not change PATH under a running app that spawns git.
- Distinguish `signal: N` from exit codes in the status text — signals point to external kills.
When it happens
Trigger: git killed by a signal (status like `signal: 9 (SIGKILL)` from OOM killers or sandbox policies); the git binary removed or replaced mid-session; resource exhaustion during long history scans; stdin/stderr pipes closed early.
Common situations: Streaming history of very large repositories under memory pressure; sandboxed CI environments killing child processes; PATH changes underneath a long-lived application so the spawned binary disappears.
Understand the failure class
Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.
Related errors
- git log command failed with {}: {}
- git merge-base --is-ancestor failed
- git ls-files failed in {} with status {}: {}
- git log failed in {} with status {}: {}
- git status failed: {stderr}
AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20).
Data as JSON: /api/errors/a110746bdf69c7e0.
Report an issue: GitHub.