git_panel: Improve toast messages for push/pull/fetch (#35092)
On GitLab, when pushing a branch and a MR already existing the remote log contains "View merge request" and the link to the MR. Fixed `Already up to date` stdout check on pull (was `Everything up to date` on stderr) Fixed `Everything up-to-date` check on push (was `Everything up to date`) Improved messaging for up-to-date for fetch/push/pull Fixed tests introduced in https://github.com/zed-industries/zed/pull/33833. <img width="470" height="111" alt="Screenshot 2025-07-31 at 18 37 05" src="https://github.com/user-attachments/assets/2a5dcc4c-6f53-4a85-b983-8e25149efcc0" /> Release Notes: - Git UI: Add "View Pull Request" when pushing to Gitlab remotes - git: Improved toast messages on fetch/push/pull --------- Co-authored-by: Peter Tripp <peter@zed.dev>
This commit is contained in:
parent
24e7f868ad
commit
182edbf526
4 changed files with 95 additions and 65 deletions
|
@ -2899,7 +2899,9 @@ impl GitPanel {
|
|||
let status_toast = StatusToast::new(message, cx, move |this, _cx| {
|
||||
use remote_output::SuccessStyle::*;
|
||||
match style {
|
||||
Toast { .. } => this,
|
||||
Toast { .. } => {
|
||||
this.icon(ToastIcon::new(IconName::GitBranchSmall).color(Color::Muted))
|
||||
}
|
||||
ToastWithLog { output } => this
|
||||
.icon(ToastIcon::new(IconName::GitBranchSmall).color(Color::Muted))
|
||||
.action("View Log", move |window, cx| {
|
||||
|
@ -2912,9 +2914,9 @@ impl GitPanel {
|
|||
})
|
||||
.ok();
|
||||
}),
|
||||
PushPrLink { link } => this
|
||||
PushPrLink { text, link } => this
|
||||
.icon(ToastIcon::new(IconName::GitBranchSmall).color(Color::Muted))
|
||||
.action("Open Pull Request", move |_, cx| cx.open_url(&link)),
|
||||
.action(text, move |_, cx| cx.open_url(&link)),
|
||||
}
|
||||
});
|
||||
workspace.toggle_status_toast(status_toast, cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue