{"version":"2.1.274","anchor":"diffgitdir-baseline-computation-made-lazy-and-cached","canonical_anchor":"diffgitdir-baseline-computation-made-lazy-and-cached","heading":"Diff\/gitdir baseline computation made lazy and cached","tier":"internal","area":"Git","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274\/e\/diffgitdir-baseline-computation-made-lazy-and-cached","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274","markdown":"### Diff\/gitdir baseline computation made lazy and cached\n\nRepository-diff computation now happens lazily and is cached instead of running eagerly upfront\n\n**What**\n\nThe internal helper that computes repository diffs no longer eagerly computes the git baseline it needs as soon as it runs. Instead, it computes and caches that baseline only when `fetchDiff` is actually called. A related function, `headKeyOf`, now explicitly passes a `null` baseline rather than a computed one.\n\n**Why**\n\nThis avoids doing potentially unnecessary work computing a git baseline when it isn't needed, improving efficiency for code paths that don't end up calling `fetchDiff`.\n\n- Area: Git\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 0\/5"}