Under the hood
The check for git-generated files now works correctly across separate git worktrees
What
Claude Code checks whether a file is marked as "linguist-generated" in git (a marker used to decide whether to treat a file as auto-generated, for example skipping it in diffs). This check now accepts an explicit git directory and working tree path, passing them to the underlying git check-attr command when given, and caches results separately per git directory.
Why
This makes the generated-file check work correctly when Claude Code is operating on a git worktree other than the main one, since it no longer has to rely on the current working directory being the right one.