Fix to support git worktree.