mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-02 13:30:26 +01:00
4ef7e164b5
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 Closes #56602. Creating a branch from the branch picker normalizes the typed name with `replace(' ', "-")`, so leading or trailing spaces became leading or trailing hyphens (e.g. ` fix-leak ` -> `-fix-leak-`). git rejects such names, so branch creation failed. Trimming the query before replacing spaces yields a valid name. Release Notes: - git_ui: Fixed branch creation failing when a branch name had leading or trailing whitespace --------- Co-authored-by: dino <dinojoaocosta@gmail.com>