zed-industries/zed · error
could not resolve repository path {:?}
Error message
could not resolve repository path {:?} What it means
Guard in SoloDiffView::open_or_focus: repository.read(cx).repo_path_to_project_path(...) returned None for the given RepoPath, so the repository-relative path cannot be mapped to a project path (the file is outside the worktree or not part of the open project).
Source
Thrown at crates/git_ui/src/solo_diff_view.rs:80
};
let existing = workspace_entity
.read(cx)
.items_of_type::<SoloDiffView>(cx)
.find(|item| item.read(cx).matches(&repository, &entry.repo_path, cx));
if let Some(existing) = existing {
workspace_entity.update(cx, |workspace, cx| {
workspace.activate_item(&existing, true, true, window, cx);
});
existing.focus_handle(cx).focus(window, cx);
return Task::ready(Ok(existing));
}
let Some(project_path) = repository
.read(cx)
.repo_path_to_project_path(&entry.repo_path, cx)
else {
return Task::ready(Err(anyhow::anyhow!(
"could not resolve repository path {:?}",
entry.repo_path
)));
};
let project = workspace_entity.read(cx).project().clone();
let repo_path = entry.repo_path;
window.spawn(cx, async move |cx| {
let buffer = project
.update(cx, |project, cx| {
project.open_buffer(project_path.clone(), cx)
})
.await?;
let diff = project
.update(cx, |project, cx| {
project.open_uncommitted_diff(buffer.clone(), cx)
})
.await?;View on GitHub (pinned to f4178619ac)
Solutions
- Confirm the repository belongs to a project worktree currently open in the workspace
- Reload the project or window so worktree paths are re-resolved
- Check that the file/repo path still exists on disk and was not moved or deleted
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/git_ui/src/solo_diff_view.rs:80 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/9cce62237d31de9f.
Report an issue: GitHub.