{"version":"2.1.277","anchor":"git-diff-stats-helpers-gained-explicit-cwdgit-dir-plumbing","canonical_anchor":"git-diff-stats-helpers-gained-explicit-cwdgit-dir-plumbing","heading":"Git diff-stats helpers gained explicit cwd\/git-dir plumbing for worktrees","tier":"internal","area":"Git Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277\/e\/git-diff-stats-helpers-gained-explicit-cwdgit-dir-plumbing","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277","markdown":"### Git diff-stats helpers gained explicit cwd\/git-dir plumbing for worktrees\n\nGit diff-stat helpers now take an explicit working directory instead of assuming the current one\n\n**What**\n\nA group of internal functions that compute git diff statistics now accept an explicit working directory (cwd) parameter, instead of relying on the ambient current directory or environment. This includes a new check for whether a merge is in progress, which now also takes a working directory.\n\n**Why**\n\nThis makes these git-stats functions work correctly when operating on a git worktree other than the main one, rather than assuming the process's own current directory.\n\n- Area: Git Internals\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 0\/5"}