Skip to content

Commit

Permalink
potentially fix credentials issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Apr 8, 2021
1 parent 273aba3 commit d5504fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/gui/credentials_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions pkg/gui/files_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d5504fa

Please sign in to comment.