Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.274 ·

Git-worktree safety vetting: relative gitdir path check reworked

Worktree safety check for the 'gitdir' pointer file was reworked to correctly detect unsafe relative paths

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaGit Worktreeswhat it touches
KindBug Fixesin v2.1.274,
You'll notice

Worktree safety check for the 'gitdir' pointer file was reworked to correctly detect unsafe relative paths

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.

See this entry in the whole of v2.1.274 →