summaryrefslogtreecommitdiffstats
path: root/pkg/gui/tags_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-05 11:57:32 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-07 10:52:51 +1100
commit05fa483f4818d45b357187700079c3bdae663df2 (patch)
treefb4fe7d3fda3e8b3e3d862c7a5e1383de456fe60 /pkg/gui/tags_panel.go
parente524e398423f8aea2961302287123085dcc5a524 (diff)
simplify how we log commands
Diffstat (limited to 'pkg/gui/tags_panel.go')
-rw-r--r--pkg/gui/tags_panel.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/gui/tags_panel.go b/pkg/gui/tags_panel.go
index 9516741e0..1bd168c04 100644
--- a/pkg/gui/tags_panel.go
+++ b/pkg/gui/tags_panel.go
@@ -63,7 +63,8 @@ func (gui *Gui) withSelectedTag(f func(tag *models.Tag) error) func() error {
// tag-specific handlers
func (gui *Gui) handleCheckoutTag(tag *models.Tag) error {
- if err := gui.handleCheckoutRef(tag.Name, handleCheckoutRefOptions{span: gui.Tr.Spans.CheckoutTag}); err != nil {
+ gui.logSpan(gui.Tr.Spans.CheckoutTag)
+ if err := gui.handleCheckoutRef(tag.Name, handleCheckoutRefOptions{}); err != nil {
return err
}
return gui.pushContext(gui.State.Contexts.Branches)
@@ -81,7 +82,8 @@ func (gui *Gui) handleDeleteTag(tag *models.Tag) error {
title: gui.Tr.DeleteTagTitle,
prompt: prompt,
handleConfirm: func() error {
- if err := gui.GitCommand.WithSpan(gui.Tr.Spans.DeleteTag).DeleteTag(tag.Name); err != nil {
+ gui.logSpan(gui.Tr.Spans.DeleteTag)
+ if err := gui.GitCommand.DeleteTag(tag.Name); err != nil {
return gui.surfaceError(err)
}
return gui.refreshSidePanels(refreshOptions{mode: ASYNC, scope: []RefreshableView{COMMITS, TAGS}})
@@ -103,7 +105,8 @@ func (gui *Gui) handlePushTag(tag *models.Tag) error {
findSuggestionsFunc: gui.getRemoteSuggestionsFunc(),
handleConfirm: func(response string) error {
return gui.WithWaitingStatus(gui.Tr.PushingTagStatus, func() error {
- err := gui.GitCommand.WithSpan(gui.Tr.Spans.PushTag).PushTag(response, tag.Name, gui.promptUserForCredential)
+ gui.logSpan(gui.Tr.Spans.PushTag)
+ err := gui.GitCommand.PushTag(response, tag.Name, gui.promptUserForCredential)
gui.handleCredentialsPopup(err)
return nil