Don't prompt twice when trashing added files from git panel (#27863)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Cole Miller 2025-04-01 14:25:58 -04:00 committed by GitHub
parent bda33ec436
commit 0934cb58c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -920,9 +920,9 @@ impl GitPanel {
cx: &mut Context<Self>, cx: &mut Context<Self>,
) { ) {
maybe!({ maybe!({
let skip_prompt = action.skip_prompt;
let list_entry = self.entries.get(self.selected_entry?)?.clone(); let list_entry = self.entries.get(self.selected_entry?)?.clone();
let entry = list_entry.status_entry()?.to_owned(); let entry = list_entry.status_entry()?.to_owned();
let skip_prompt = action.skip_prompt || entry.status.is_created();
let prompt = if skip_prompt { let prompt = if skip_prompt {
Task::ready(Ok(0)) Task::ready(Ok(0))