summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-09 00:33:39 +1000
committerJesse Duffield <jessedduffield@gmail.com>2021-04-09 00:39:04 +1000
commitd5504fa5d0d4e0312e1b27b8dbe3c6c664395a31 (patch)
tree8d9987e258df6c69343ea5e410ec7a02db1bde14
parent273aba38d403660127508a1453253100ad802668 (diff)
potentially fix credentials issuev0.27.2
-rw-r--r--pkg/gui/credentials_panel.go3
-rw-r--r--pkg/gui/files_panel.go4
-rw-r--r--pkg/gui/layout.go2
3 files changed, 7 insertions, 2 deletions
diff --git a/pkg/gui/credentials_panel.go b/pkg/gui/credentials_panel.go
index 5911ddff0..ac162ae02 100644
--- a/pkg/gui/credentials_panel.go
+++ b/pkg/gui/credentials_panel.go
@@ -48,7 +48,7 @@ func (gui *Gui) handleSubmitCredential() error {
return err
}
- return gui.refreshSidePanels(refreshOptions{})
+ return gui.refreshSidePanels(refreshOptions{mode: ASYNC})
}
func (gui *Gui) handleCloseCredentialsView() error {
@@ -78,6 +78,7 @@ func (gui *Gui) handleCredentialsPopup(cmdErr error) {
if strings.Contains(errMessage, "Invalid username, password or passphrase") {
errMessage = gui.Tr.PassUnameWrong
}
+ _ = gui.returnFromContext()
// we are not logging this error because it may contain a password or a passphrase
_ = gui.createErrorPanel(errMessage)
} else {
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go
index f2ed2f3a3..341849061 100644
--- a/pkg/gui/files_panel.go
+++ b/pkg/gui/files_panel.go
@@ -729,6 +729,10 @@ func (gui *Gui) pushFiles() error {
// if we have pullables we'll ask if the user wants to force push
currentBranch := gui.currentBranch()
+ if currentBranch == nil {
+ // need to wait for branches to refresh
+ return nil
+ }
if currentBranch.Pullables == "?" {
// see if we have this branch in our config with an upstream
diff --git a/pkg/gui/layout.go b/pkg/gui/layout.go
index cdccb5b0f..29d75a1b5 100644
--- a/pkg/gui/layout.go
+++ b/pkg/gui/layout.go
@@ -355,10 +355,10 @@ func (gui *Gui) onInitialViewsCreation() error {
// popups. Ordering within this layer does not matter because there should
// only be one popup shown at a time
gui.Views.CommitMessage,
- gui.Views.Credentials,
gui.Views.Menu,
gui.Views.Suggestions,
gui.Views.Confirmation,
+ gui.Views.Credentials,
// this guy will cover everything else when it appears
gui.Views.Limit,