zed/crates/git_ui
zed-zippy[bot] d93bcc4ad0
git: Fix create worktree hook tasks running when switching worktrees (#54612) (cherry-pick to preview) (#54642)
Cherry-pick of #54612 to preview

----
This PR fixes a regression that was likely caused by:
https://github.com/zed-industries/zed/pull/54183 and wasn't caught
because I didn't add a regression test when I originally created the
feature.

The fix was only running the hooks when the worktree was just created,
and I added an integration test to prevent regressions from occurring
again in the future.

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 #54598

Release Notes:

- git: Fix create worktree hook tasks running when switching worktrees

Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
2026-04-23 11:24:30 +00:00
..
src git: Fix create worktree hook tasks running when switching worktrees (#54612) (cherry-pick to preview) (#54642) 2026-04-23 11:24:30 +00:00
Cargo.toml git: Fix create worktree hook tasks running when switching worktrees (#54612) (cherry-pick to preview) (#54642) 2026-04-23 11:24:30 +00:00
LICENSE-GPL Add placeholder git panel (#21894) 2024-12-11 22:13:52 -05:00