Add error message if target branch not found with prompt

This commit is contained in:
Denis Palashevskii
2021-07-27 21:30:08 +10:00
committed by Jesse Duffield
parent d1134daa53
commit 3802b563b0
+3
View File
@@ -45,6 +45,9 @@ func (gui *Gui) createPullRequestMenu(selectedBranch *models.Branch, checkedOutB
findSuggestionsFunc: gui.findBranchNameSuggestions,
handleConfirm: func(response string) error {
targetBranch := gui.getBranchByName(response)
if targetBranch == nil {
return gui.createErrorPanel(gui.Tr.BranchNotFoundTitle)
}
return createPullRequest(checkedOutBranch, targetBranch, gui)
}},
)