mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-17 07:55:42 +00:00
When uncommiting we check whether the commit already exists on a remote branch. This currently spawns a lot of git processes to do so, especially when having multiple remotes. This PR switches this to a single `git for-each-ref` call to do the same checks. I tested this in the UI and added some unit tests to verify this behaviour. This is a followup on #59053, #59044 and #59042 with the goal to reduce overhead of the git handling. 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Improved performance of git uncommit