fix(vcs): resolve shelf files against their owning repository (#919)

Root cause: shelved file paths are relative to the repository they were shelved from, but Compare with Local, Show Diff, navigation and Unshelve joined them to the selected VCS root. In a project folder that is not itself a repository (or holds several), the local file was not found and Compare with Local stayed disabled. Shelves now record their repository (older shelves fall back to the primary repository), imported patches record the current one, and every shelf action resolves paths against it, with Windows separators handled. Stash and Apply Patch already kept their repository.

Fixes #875

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Цей коміт міститься в:
l0ng-aiтаClaude Opus 5.5 authored and GitHub committed 2026-11-03 07:52:55 +08:00
1 джерело 7af2b098cc
коміт d9929bbe44
15 files changed
+327 -44

No files matched your search

+2 -1
Переглянути файл
@@ -675,10 +675,11 @@ pub async fn vcs_shelf_diff(
pub async fn vcs_shelf_import(
window: Window,
state: State<'_, AppState>,
repo: Option<PathBuf>,
name: String,
patch: String,
) -> IdeResult<()> {
ide_host::ops::vcs::vcs_shelf_import(&state.host, window.label(), name, patch).await
ide_host::ops::vcs::vcs_shelf_import(&state.host, window.label(), repo, name, patch).await
}
#[tauri::command]