A repository can no longer use replace refs or grafts to change what history Claude Code sees.
What's wrong with this entry?
Every git subprocess Claude Code runs is now given GIT_NO_REPLACE_OBJECTS=1 and GIT_GRAFT_FILE=/dev/null, so a repository cannot use replace refs or a graft file to change what history Claude Code sees. This sits alongside the existing scrubbing of hook environment variables.
- Applied unconditionally on the git environment path, with no opt-out.
- The shallow-repository probe gained a matching hardened path.
GIT_NO_REPLACE_OBJECTS
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