git: Fix errors not showing in the toast notification (#26303)

Release Notes:

- Resolved an issue where error messages from Git were not being
displayed in toast notifications.
<img width="1702" alt="Screenshot 2025-03-08 at 1 11 30 AM"
src="https://github.com/user-attachments/assets/a46517db-4e64-4c5e-a64e-96e820ca9aec"
/>
This commit is contained in:
Kiran_Peraka 2025-03-08 02:27:53 +05:30 committed by GitHub
parent 103ad635d9
commit f57dece2d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 4 deletions

View file

@ -1571,6 +1571,7 @@ impl GitPanel {
this.show_remote_output(RemoteAction::Fetch, remote_message, cx);
}
Err(e) => {
log::error!("Error while fetching {:?}", e);
this.show_err_toast(e, cx);
}
}
@ -1629,7 +1630,10 @@ impl GitPanel {
Ok(remote_message) => {
this.show_remote_output(RemoteAction::Pull, remote_message, cx)
}
Err(err) => this.show_err_toast(err, cx),
Err(err) => {
log::error!("Error while pull {:?}", err);
this.show_err_toast(err, cx)
}
})
.ok();
@ -1697,6 +1701,7 @@ impl GitPanel {
this.show_remote_output(RemoteAction::Push(remote), remote_message, cx);
}
Err(e) => {
log::error!("Error while pushing {:?}", e);
this.show_err_toast(e, cx);
}
})?;