diff options
Diffstat (limited to 'src/app/api/worktrees/deferred.rs')
| -rw-r--r-- | src/app/api/worktrees/deferred.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/app/api/worktrees/deferred.rs b/src/app/api/worktrees/deferred.rs index 3cd5e9f1..4755b38d 100644 --- a/src/app/api/worktrees/deferred.rs +++ b/src/app/api/worktrees/deferred.rs @@ -199,6 +199,7 @@ impl App { &path, &branch, &base, + params.trust_repository, ) }); let _ = event_tx.blocking_send(AppEvent::WorktreeAddFinished(Box::new( @@ -259,7 +260,11 @@ impl App { #[cfg(windows)] { if !params.force - && crate::worktree::checkout_has_dirty_files(&space.checkout_path).unwrap_or(false) + && crate::worktree::checkout_has_dirty_files( + &space.checkout_path, + params.trust_repository, + ) + .unwrap_or(false) { Self::send_api_response( respond_to, @@ -311,6 +316,7 @@ impl App { &space.repo_root, &space.checkout_path, params.force, + params.trust_repository, ); let api_request = ApiWorktreeRemoveRequest { id, @@ -321,10 +327,15 @@ impl App { let repo_root = space.repo_root; let path = space.checkout_path; let force = params.force; + let trust_repository = params.trust_repository; let event_tx = self.event_tx.clone(); std::thread::spawn(move || { let result = crate::worktree::run_worktree_remove_command_with_recovery( - &command, &repo_root, &path, force, + &command, + &repo_root, + &path, + force, + trust_repository, ); let _ = event_tx.blocking_send(AppEvent::WorktreeRemoveFinished(Box::new( crate::events::WorktreeRemoveResult { |
