Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

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

Cole Miller0934cb58c43d
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs
index 9f126810f69..db9d76e1580 100644
--- a/crates/git_ui/src/git_panel.rs
+++ b/crates/git_ui/src/git_panel.rs
@@ -920,9 +920,9 @@ impl GitPanel {
cx: &mut Context<Self>,
) {
maybe!({
- let skip_prompt = action.skip_prompt;
let list_entry = self.entries.get(self.selected_entry?)?.clone();
let entry = list_entry.status_entry()?.to_owned();
+ let skip_prompt = action.skip_prompt || entry.status.is_created();
let prompt = if skip_prompt {
Task::ready(Ok(0))