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.

Handle git push when there is no remote (#54522)

Chris Biscardi8e4c6797238d
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs
index 1f9f08f47f0..23d9c728c05 100644
--- a/crates/git_ui/src/git_panel.rs
+++ b/crates/git_ui/src/git_panel.rs
@@ -3109,6 +3109,14 @@ impl GitPanel {
let remote = match remote.await {
Ok(Some(remote)) => remote,
Ok(None) => {
+ this.update(cx, |this, cx| {
+ this.show_error_toast(
+ "push",
+ anyhow::anyhow!("No remote available to push to. Add a remote to be able to publish changes."),
+ cx,
+ )
+ })
+ .ok();
return Ok(());
}
Err(e) => {