# git_ui: Fix remote branches missing from branch diff base picker \(\#60765\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a21e87c07711e2afa5169cc6d25cf9a0649b7183

Requested commit: a21e87c07711e2afa5169cc6d25cf9a0649b7183

Commit: a21e87c07711e2afa5169cc6d25cf9a0649b7183

Tree: faeccd5aab8cdfc2f30b9c85eec83abb403a15ac

Author: Smit Barmase

Committer: GitHub

## Message

```
git_ui: Fix remote branches missing from branch diff base picker (#60765)

The branch picker collapses remote branches that are tracked by a local
branch (e.g. `origin/main` when local `main` tracks it). That makes
sense for checkout, where the remote ref is redundant, but it was also
applied to the branch diff base picker, where `main` and `origin/main`
can point to different commits. As a result, once you switched the diff
base from `origin/main` to `main`, there was no way to switch back.

The tracked-remote collapsing is now only applied in checkout mode (no
changed here). The select (diff base) picker lists both local branches
and their remote upstreams.

Release Notes:

- Fixed remote branches (e.g. `origin/main`) not appearing in the branch
diff base picker, making it impossible to switch back after changing the
base to another branch.
```

## Parents

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

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