{"version":"2.1.242","anchor":"worktree-cleanup-passes-account-state-to-the-removal-hook","canonical_anchor":"worktree-cleanup-passes-account-state-to-the-removal-hook","heading":"Worktree cleanup passes account state to the removal hook","tier":"internal","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242\/e\/worktree-cleanup-passes-account-state-to-the-removal-hook","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242","markdown":"### Worktree cleanup passes account state to the removal hook\n\nWorktree removal now passes account state to your WorktreeRemove hook and the record-clearing call.\n\n**What**\n\nThe routine that removes a git worktree now receives storage and credentials and hands both to the WorktreeRemove hook and to the call that clears the recorded worktree.\n\n**Details**\n\n- Lock ownership, Windows reparse point handling and the fallback to `git worktree remove` are unchanged, as is the wording of the kept and removed log lines.\n\n**Evidence**\n\n`WorktreeRemove hook did not remove worktree, kept at: `\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}