1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-23 00:39:13 +02:00

review fixes: PR URL refactoring, target branch selection prompt

This commit is contained in:
Denis Palashevskii
2021-06-26 13:49:49 +04:00
committed by Jesse Duffield
parent 63cb304a82
commit d1134daa53
3 changed files with 56 additions and 26 deletions

View File

@ -545,6 +545,16 @@ func (gui *Gui) getBranchNames() []string {
return result
}
func (gui *Gui) getBranchByName(name string) *models.Branch {
for _, branch := range gui.State.Branches {
if branch.Name == name {
return branch
}
}
return nil
}
func (gui *Gui) findBranchNameSuggestions(input string) []*types.Suggestion {
branchNames := gui.getBranchNames()