worktrees: reject refs/heads and @{ branch names on create (#146)

worktree.create only ran git check-ref-format --branch, which still
accepts refs/heads/foo and @{-1}. The former creates nested
refs/heads/refs/heads/...; the latter expands to another branch.
Reuse validate_branch_name (same rules as task.start) so prefs/theme
stays valid while those traps are refused.

Opened by TtyPatch

Co-authored-by: Grok Bot <grok-bot@x.ai>
1d60fec13cSimone committed on 10/19/2026, 1:10:05 PM· committed by GitHubparent1862dd4
2 files changedLine totals unavailable