{"version":"2.1.277","anchor":"linguist-generated-file-check-now-supports-explicit-git-dir","canonical_anchor":"linguist-generated-file-check-now-supports-explicit-git-dir","heading":"linguist-generated file check now supports explicit git-dir\/work-tree (worktree awareness)","tier":"internal","area":"Git Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277\/e\/linguist-generated-file-check-now-supports-explicit-git-dir","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277","markdown":"### linguist-generated file check now supports explicit git-dir\/work-tree (worktree awareness)\n\nThe check for git-generated files now works correctly across separate git worktrees\n\n**What**\n\nClaude 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.\n\n**Why**\n\nThis 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.\n\n- Area: Git Internals\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}