diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-05 11:57:32 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-07 10:52:51 +1100 |
commit | 05fa483f4818d45b357187700079c3bdae663df2 (patch) | |
tree | fb4fe7d3fda3e8b3e3d862c7a5e1383de456fe60 /pkg/gui/remote_branches_panel.go | |
parent | e524e398423f8aea2961302287123085dcc5a524 (diff) |
simplify how we log commands
Diffstat (limited to 'pkg/gui/remote_branches_panel.go')
-rw-r--r-- | pkg/gui/remote_branches_panel.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/gui/remote_branches_panel.go b/pkg/gui/remote_branches_panel.go index a18479281..2af33bf72 100644 --- a/pkg/gui/remote_branches_panel.go +++ b/pkg/gui/remote_branches_panel.go @@ -57,7 +57,8 @@ func (gui *Gui) handleDeleteRemoteBranch() error { prompt: message, handleConfirm: func() error { return gui.WithWaitingStatus(gui.Tr.DeletingStatus, func() error { - err := gui.GitCommand.WithSpan(gui.Tr.Spans.DeleteRemoteBranch).DeleteRemoteBranch(remoteBranch.RemoteName, remoteBranch.Name, gui.promptUserForCredential) + gui.logSpan(gui.Tr.Spans.DeleteRemoteBranch) + err := gui.GitCommand.DeleteRemoteBranch(remoteBranch.RemoteName, remoteBranch.Name, gui.promptUserForCredential) gui.handleCredentialsPopup(err) return gui.refreshSidePanels(refreshOptions{scope: []RefreshableView{BRANCHES, REMOTES}}) @@ -87,7 +88,8 @@ func (gui *Gui) handleSetBranchUpstream() error { title: gui.Tr.SetUpstreamTitle, prompt: message, handleConfirm: func() error { - if err := gui.GitCommand.WithSpan(gui.Tr.Spans.SetBranchUpstream).SetBranchUpstream(selectedBranch.RemoteName, selectedBranch.Name, checkedOutBranch.Name); err != nil { + gui.logSpan(gui.Tr.Spans.SetBranchUpstream) + if err := gui.GitCommand.SetBranchUpstream(selectedBranch.RemoteName, selectedBranch.Name, checkedOutBranch.Name); err != nil { return gui.surfaceError(err) } |