Subject: Re: [PATCH v2 0/2] merge-ours: sparse-index integration

From: Derrick Stolee <[email-masked]>
Date: Mon, 9 Feb 2026 23:35:48 -0500

On 2/6/2026 2:16 PM, Sam Bostock via GitGitGadget wrote:
> This short series teaches merge-ours to work with a sparse index as a small
> step toward broader sparse-index support.
> 
> Patch 1 is a preparatory cleanup that converts merge-ours away from
> the_repository global, using the repo parameter instead.
> 
> Patch 2 adds the actual sparse-index integration and tests.

Thanks for working in this area. We have a long tail of instances where
the sparse-index could be integrated at its most bare-minimum case.

> Developed with AI assistance (Claude).

My experiments with such tools seem to do well when there are clear
examples of how to make tests and how to make appropriate fixes. The
tests added to t1092 follow the standard model for checking that
the index isn't expanded. Perhaps the many cases we have for these
integrations could be tackled more easily with such tools. I expect
that they are _mostly_ boilerplate tests and minor fixes (but don't
look too closely at 'git mv' which doesn't have clear patterns with
sparse-checkout even with a full index).

The one thing I didn't see that we normally see is a case where the
sparse index _is_ expanded, but that shouldn't happen with the 'ours'
strategy! Excellent.

These patches LGTM.

Thanks,
-Stolee