diff options
Diffstat (limited to 'src/app/api')
| -rw-r--r-- | src/app/api/worktrees.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app/api/worktrees.rs b/src/app/api/worktrees.rs index d6a269ca..573771e2 100644 --- a/src/app/api/worktrees.rs +++ b/src/app/api/worktrees.rs @@ -292,6 +292,22 @@ impl App { ); } + #[cfg(windows)] + { + if !params.force + && crate::worktree::checkout_has_dirty_files(&space.checkout_path).unwrap_or(false) + { + return encode_error( + id, + "dirty_worktree_requires_force", + crate::worktree::worktree_dirty_remove_message(&space.checkout_path), + ); + } + } + + #[cfg(windows)] + self.shutdown_workspace_terminal_runtimes_for_worktree_remove(ws_idx); + let command = crate::worktree::build_worktree_remove_command( &space.repo_root, &space.checkout_path, |
