{"version":"2.1.277","anchor":"git-helper-functions-refactored-to-accept-an-explicit-workin","canonical_anchor":"git-helper-functions-refactored-to-accept-an-explicit-workin","heading":"Git helper functions refactored to accept an explicit working directory","tier":"internal","area":"Git Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277\/e\/git-helper-functions-refactored-to-accept-an-explicit-workin","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277","markdown":"### Git helper functions refactored to accept an explicit working directory\n\nGit diff\/status helper functions can now target an explicit working directory instead of always using the process's own\n\n**What**\n\nA group of internal git helper functions that compute diffs and status were changed to accept an explicit working directory parameter, rather than always operating on the directory the Claude Code process itself is running in. A new helper picks between the normal environment and an isolated environment (with `extendEnv` turned off) depending on whether a working directory was passed in.\n\n**Why**\n\nThis allows git operations to be run correctly against a different folder than the current process directory, which matters for features that need to inspect git state in another location, such as a separate worktree or machine.\n\n- Area: Git Internals\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}