# git_ui: Truncate long repository and branch names for respective selectors in panel \(\#26483\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7019aca59d00d2ad7578d3233e16e66bc1ae4929

Requested commit: 7019aca59d00d2ad7578d3233e16e66bc1ae4929

Commit: 7019aca59d00d2ad7578d3233e16e66bc1ae4929

Tree: 58cb2db6d5bb447d36dec60f99bdc156d65a1655

Author: Nate Butler

Committer: GitHub

## Message

```
git_ui: Truncate long repository and branch names for respective selectors in panel (#26483)

This PR fixes a long repo name pushing the branch selector off the
screen, as well as just generally truncating them down in a way smarter
than a fixed character limit when long.

| Before | After |
|---------|-----------|
| ![CleanShot 2025-03-11 at 17 21
31@2x](https://github.com/user-attachments/assets/8762b5a7-883c-4080-a6cf-e8007c4737e7)
| ![CleanShot 2025-03-11 at 17 21
44@2x](https://github.com/user-attachments/assets/c3904c29-d939-445f-b700-5bf73f257256)
|


Release Notes:

- Git Panel: Smart truncate long branch and repository names in their
respective selectors
```

## Parents

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

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