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/commit_files_panel.go | |
parent | e524e398423f8aea2961302287123085dcc5a524 (diff) |
simplify how we log commands
Diffstat (limited to 'pkg/gui/commit_files_panel.go')
-rw-r--r-- | pkg/gui/commit_files_panel.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/gui/commit_files_panel.go b/pkg/gui/commit_files_panel.go index 3194c436b..f5c24adc1 100644 --- a/pkg/gui/commit_files_panel.go +++ b/pkg/gui/commit_files_panel.go @@ -63,7 +63,8 @@ func (gui *Gui) handleCheckoutCommitFile() error { return nil } - if err := gui.GitCommand.WithSpan(gui.Tr.Spans.CheckoutFile).CheckoutFile(gui.State.CommitFileManager.GetParent(), node.GetPath()); err != nil { + gui.logSpan(gui.Tr.Spans.CheckoutFile) + if err := gui.GitCommand.CheckoutFile(gui.State.CommitFileManager.GetParent(), node.GetPath()); err != nil { return gui.surfaceError(err) } @@ -82,7 +83,8 @@ func (gui *Gui) handleDiscardOldFileChange() error { prompt: gui.Tr.DiscardFileChangesPrompt, handleConfirm: func() error { return gui.WithWaitingStatus(gui.Tr.RebasingStatus, func() error { - if err := gui.GitCommand.WithSpan(gui.Tr.Spans.DiscardOldFileChange).DiscardOldFileChanges(gui.State.Commits, gui.State.Panels.Commits.SelectedLineIdx, fileName); err != nil { + gui.logSpan(gui.Tr.Spans.DiscardOldFileChange) + if err := gui.GitCommand.DiscardOldFileChanges(gui.State.Commits, gui.State.Panels.Commits.SelectedLineIdx, fileName); err != nil { if err := gui.handleGenericMergeCommandResult(err); err != nil { return err } |