diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-12 19:04:20 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-12 19:07:40 +1100 |
commit | 031e97ef91654a53e7e534e7d4aa032e06eee319 (patch) | |
tree | ebd41bc2f974e84ab01dee70f2413b688c6e6371 /pkg/gui | |
parent | 3df0a9f1322c5bb0e76967ee4b6ec3507ec41894 (diff) |
more password checks on commands that talk to the remote
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/remote_branches_panel.go | 5 | ||||
-rw-r--r-- | pkg/gui/remotes_panel.go | 1 | ||||
-rw-r--r-- | pkg/gui/tags_panel.go | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/pkg/gui/remote_branches_panel.go b/pkg/gui/remote_branches_panel.go index 1155529ce..582ed749d 100644 --- a/pkg/gui/remote_branches_panel.go +++ b/pkg/gui/remote_branches_panel.go @@ -60,9 +60,8 @@ func (gui *Gui) handleDeleteRemoteBranch(g *gocui.Gui, v *gocui.View) error { prompt: message, handleConfirm: func() error { return gui.WithWaitingStatus(gui.Tr.DeletingStatus, func() error { - if err := gui.GitCommand.DeleteRemoteBranch(remoteBranch.RemoteName, remoteBranch.Name); err != nil { - return err - } + err := gui.GitCommand.DeleteRemoteBranch(remoteBranch.RemoteName, remoteBranch.Name, gui.promptUserForCredential) + gui.handleCredentialsPopup(err) return gui.refreshSidePanels(refreshOptions{scope: []int{BRANCHES, REMOTES}}) }) diff --git a/pkg/gui/remotes_panel.go b/pkg/gui/remotes_panel.go index f3c984d78..76ca536cb 100644 --- a/pkg/gui/remotes_panel.go +++ b/pkg/gui/remotes_panel.go @@ -166,7 +166,6 @@ func (gui *Gui) handleFetchRemote(g *gocui.Gui, v *gocui.View) error { gui.Mutexes.FetchMutex.Lock() defer gui.Mutexes.FetchMutex.Unlock() - // TODO: test this err := gui.GitCommand.FetchRemote(remote.Name, gui.promptUserForCredential) gui.handleCredentialsPopup(err) diff --git a/pkg/gui/tags_panel.go b/pkg/gui/tags_panel.go index 6478dc016..6f9004e4d 100644 --- a/pkg/gui/tags_panel.go +++ b/pkg/gui/tags_panel.go @@ -98,10 +98,12 @@ func (gui *Gui) handlePushTag(g *gocui.Gui, v *gocui.View) error { ) return gui.prompt(title, "origin", func(response string) error { - if err := gui.GitCommand.PushTag(response, tag.Name); err != nil { - return gui.surfaceError(err) - } - return nil + return gui.WithWaitingStatus(gui.Tr.PushingTagStatus, func() error { + err := gui.GitCommand.PushTag(response, tag.Name, gui.promptUserForCredential) + gui.handleCredentialsPopup(err) + + return nil + }) }) } |