1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-19 21:28:28 +02:00

Add error message if target branch not found with prompt

This commit is contained in:
Denis Palashevskii 2021-06-26 14:14:19 +04:00 committed by Jesse Duffield
parent d1134daa53
commit 3802b563b0

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)
}},
)