fix(hooks): a raw switch in a foreign linked worktree is denied as a foreign primary #869
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#869
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The gap
I ran a plain
git switch v0.20.0in a linked worktree thatmadt_worktrees action=addcreated for a scratch repo outside the session's directory. The local-git hook denied it with "Moving the PRIMARY checkout of a foreign repo is not allowed". The target was a linked worktree, not a primary. I have not checked why the hook classified it as a primary.Repro
madt_worktrees action=add dir=<repo> path=.worktrees/wt branch=wt.cd <repo>/.worktrees/wt && git switch <tag>.What I want
Acceptance criteria