Re-addressing

Then it walks what the copy now claims about itself and applies one of three dispositions.

Then it walks what the copy now claims about itself and applies one of three dispositions.

DispositionWhat it applies to
Repaircore.hooksPath, which is rewritten to the clone's own hooks
Dropworktree registrations, at the top level and inside every submodule's git directory
Reportsymlinks and virtualenvs, which doctor names and leaves alone

Dropping the registrations is what keeps a clone from claiming the canonical's worktrees. Those registrations are copied along with the submodule git directories that hold them, and a clone that inherits them tells remove it is hosting worktrees it has never seen.