# git: Use repo snapshot to fetch picker branch list instead of spawning a job \(\#53661\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/bd78089e3606089972d667971bb408508bef779c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: bd78089e3606089972d667971bb408508bef779c

Requested commit: bd78089e3606089972d667971bb408508bef779c

Commit: bd78089e3606089972d667971bb408508bef779c

Tree: 750a12404162ce5df0c73d7c7cfed2b6045365c9

Author: Anthony Eid

Committer: GitHub

## Message

```
git: Use repo snapshot to fetch picker branch list instead of spawning a job (#53661)

This should fix a delay where the thread_branch_picker and git_picker
would take a while to load the branch list while other git jobs are
being processed before hand.

I also added a subscription in both pickers to repository so they
refresh their matches when the repo snapshot branch list changes.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
```

## Parents

- [0272aab3d67edc114643b92162ad7b93876f975b](https://git.cafe/gitcafe/zed/commit/0272aab3d67edc114643b92162ad7b93876f975b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/bd78089e3606089972d667971bb408508bef779c?format=markdown)
