You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
Git WorktreesArea: what it touches
Bug FixesKind: in v2.1.274,
Bug FixesSection of the release
What
The routine that validates a worktree's gitdir pointer file, used to decide whether it's safe to treat as a real git directory, now normalizes the path relative to the repository's common directory before checking it for .. or . segments. This replaces a previous check that appeared buggy, since it searched the wrong variable (r) instead of the freshly-split path.
Why
This fixes a worktree safety check so that suspicious relative paths in a gitdir file (the kind git itself would not normally write) are properly detected, reducing the chance of treating an unsafe location as a legitimate git directory.