Select branch dropdown when cherry picking commit is inconsistent
Problem
When cherry-picking a commit, the select branch dropdown should filter by the currently selected branch.
This works in some projects but not in others, such as gitlab-org.
Update
It seems the search which filters the list of branches checks if the search term is contained within a branch.
This logic results in the branch "master" being lost in the list of other branches which also contain the word "master", as seen in the screenshot.
The following snippet of code is responsible
return this.joinedBranches.filter((resultString) =>
resultString.toLowerCase().includes(lowerCasedSearchTerm),
);
Screenshots
| Expected | Actual |
|---|---|
![]() |
![]() |
Steps to Recreate
- Go to the list of commits in https://gitlab.com/gitlab-org/gitlab/
- Select Commit
- Select Options > Cherry-pick
- Click on dropdown "Pick into branch"
Related
Related to this issue which highlights the undesirable UX for this dropdown.
Possible Solution
Based on the discussion here: !110012 (comment 1255182921). Don't filter the list of items by default and push selected branch to the top of the list.
| Default | With Search |
|---|---|
![]() |
![]() |
Edited by Ross Byrne



