git: Show all branches in branch picker empty state (#44742)

Anthony Eid created

This fixes an issue where a user could get confused by the branch picker
because it would only show the 10 most recent branches, instead of all
branches.

Release Notes:

- git: Show all branches in branch picker when search field is empty

Change summary

crates/git_ui/src/branch_picker.rs | 2 --
1 file changed, 2 deletions(-)

Detailed changes

crates/git_ui/src/branch_picker.rs 🔗

@@ -636,7 +636,6 @@ impl PickerDelegate for BranchListDelegate {
             return Task::ready(());
         };
 
-        const RECENT_BRANCHES_COUNT: usize = 10;
         let display_remotes = self.display_remotes;
         cx.spawn_in(window, async move |picker, cx| {
             let mut matches: Vec<Entry> = if query.is_empty() {
@@ -649,7 +648,6 @@ impl PickerDelegate for BranchListDelegate {
                             !branch.is_remote()
                         }
                     })
-                    .take(RECENT_BRANCHES_COUNT)
                     .map(|branch| Entry::Branch {
                         branch,
                         positions: Vec::new(),