Checking out a fork pull request fails with Unable to fetch change request refs for worktree branch main/patch-1 when the fork owner happens to share a name with a local branch - main, master, dev. The pull request itself is fine and the fetch would otherwise work. This is getpaseo/paseo#6830, fixed in PR #6829.
Why it happens
A branch name is a ref path. main is the file refs/heads/main, and main/patch-1 would have to live at refs/heads/main/patch-1, inside a directory that cannot exist while the file does. Git says so plainly:
fatal: cannot lock ref 'refs/heads/main/patch-1': 'refs/heads/main' exists; cannot create 'refs/heads/main/patch-1'
The collision runs both ways. An existing bob/patch-1/child blocks creating bob/patch-1, and an existing bob/patch-1 blocks a later bob. The allocator that picked the name checked for exact matches only, so it handed git a name that could never be created, and the fetch failed before any checkout ran.
The fix
PR #6829 suffixes the conflicting path segment instead of failing, so main-1/patch-1 sits alongside main and the checkout keeps the fork's identity.
If you generate branch names as owner/branch, check for nesting collisions in both directions before handing the name to git, or use a separator that cannot nest. Exact-match lookups are not enough - the conflict is between a ref and any ref that would live under it.