summaryrefslogtreecommitdiffstats
path: root/pkg/gui/branches_panel.go
diff options
context:
space:
mode:
authorDenis Palashevskii <palash.denis@outlook.com>2021-06-26 13:49:49 +0400
committerJesse Duffield <jessedduffield@gmail.com>2021-07-27 21:30:08 +1000
commitd1134daa536767568a3499faf06aaef7aa9f801d (patch)
treebbacc2fbf5c3eb77ed2f3a7df3a840edf9507d65 /pkg/gui/branches_panel.go
parent63cb304a822a7f0166f3ac57daee96b7e86d89ad (diff)
review fixes: PR URL refactoring, target branch selection prompt
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r--pkg/gui/branches_panel.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index da55c9df8..867566a24 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -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()