{"version":"2.1.307","anchor":"diff-copy-of-nested-git-repos-hardened","canonical_anchor":"diff-copy-of-nested-git-repos-hardened","heading":"Safer copying of nested git repositories when comparing changes","tier":"notice","area":"Git","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307\/e\/diff-copy-of-nested-git-repos-hardened","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307","markdown":"### Safer copying of nested git repositories when comparing changes\n\nWhen copying a git repository nested inside your project to compare changes, Claude Code now checks the copy harder and refuses mismatched work trees\n\n**What**\n\nSometimes Claude Code finds a git repository nested inside the folder it is working in. To compare that repository's changes, it makes a temporary copy. That copy step now has more checks:\n\n- It refuses if the repository's working folder (its work tree, the folder git treats as holding the files) is not the folder Claude Code was checking.\n\n- It reads git's configuration with `GIT_DIR` pointed at a repository that does not exist and starting from the top of the filesystem, so no surrounding repository's settings are picked up.\n\n- It runs an extra check on the temporary copy before using it.\n\n- It creates the temporary folder in a new way.\n\nWhen a configuration value is rejected, the message now labels it as a \"config value of\" that setting.\n\n**Why**\n\nA repository you did not create can carry settings that make git behave unexpectedly. These checks make it safer to compare changes in repositories you may not trust.\n\n- Area: Git\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}