Skip to content

git: Fix create worktree hook tasks running when switching worktrees (#54612) (cherry-pick to stable)#54643

Merged
zed-zippy[bot] merged 1 commit intov0.233.xfrom
cherry-pick-v0.233.x-b8305247
Apr 23, 2026
Merged

git: Fix create worktree hook tasks running when switching worktrees (#54612) (cherry-pick to stable)#54643
zed-zippy[bot] merged 1 commit intov0.233.xfrom
cherry-pick-v0.233.x-b8305247

Conversation

@zed-zippy
Copy link
Copy Markdown
Contributor

@zed-zippy zed-zippy Bot commented Apr 23, 2026

Cherry-pick of #54612 to stable


This PR fixes a regression that was likely caused by:
#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:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX
    checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #54598

Release Notes:

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

…54612)

This PR fixes a regression that was likely caused by:
#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
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 23, 2026
@zed-community-bot zed-community-bot Bot added the bot Pull requests authored by a bot label Apr 23, 2026
@zed-zippy zed-zippy Bot merged commit 7f5bb61 into v0.233.x Apr 23, 2026
41 checks passed
@zed-zippy zed-zippy Bot deleted the cherry-pick-v0.233.x-b8305247 branch April 23, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Pull requests authored by a bot cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant