zed/crates/git
Lukas Geiger e770c94187
git: Reduce number of spawned git processes when retrieving remote URLs (#59053)
Currently Zed fetches remote URLs by sequentially calling `git remote
get-url origin` and `git remote get-url upstream`.
This PR introduces a new `remote_urls` function which uses `git remote
-v` to retrieve all remote fetch URLs with a single git process.

Followup on #59042 and #59042 in the hope to reduce the amount of
spawned git processes.

Probably best to review both commits separately.

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 listing git remotes
2026-06-15 07:26:48 +00:00
..
src git: Reduce number of spawned git processes when retrieving remote URLs (#59053) 2026-06-15 07:26:48 +00:00
test_data Add an undo button to the git panel (#24593) 2025-02-12 15:57:08 -07:00
Cargo.toml Remove git2 (libgit2) dependency (#53453) 2026-06-02 05:35:36 +00:00
clippy.toml git: Add trusted worktree support to git integrations (#50649) 2026-03-04 12:19:13 +00:00
LICENSE-GPL