Claude inspects a synced checkout's git config first and refuses to run git there if it looks unsafe.
What's wrong with this entry?
Before running git in a synced directory, Claude Code now inspects that checkout's configuration and refuses when it looks unsafe, with a named reason. This blocks a repository from steering git commands run on your behalf.
- Refusal reasons include a git executable inside the checkout, a config file inside the work tree that contributes to configuration, include chains that are too deep or too numerous, non-UTF-8 hook or filter names, reftable or borrowed object stores, and a
.gitfile pointing back inside the work tree. - It first probes the git binary to confirm it honours configuration from the environment, which requires git 2.31 or newer.
- When it does run git, hooks are pinned off by name, filter drivers are cleared, and
GIT_CONFIGandGIT_ATTR_SOURCEare blanked from the environment.
[dirSync] refusing to run git in
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.247
Worktree cleanliness checks and removal use the same pinned config, and removal aborts when unsure
Both mention safety
-
v2.1.247
Git metadata files are read with a size cap instead of being slurped whole
Both mention safety
-
v2.1.239
Wider Unicode normalisation of untrusted text
Both mention safety