Subject: Re: [GSoC PATCH v2] backfill: auto-detect sparse-checkout from config

From: Derrick Stolee <[email-masked]>
Date: Sat, 4 Apr 2026 13:36:52 -0400

On 4/4/26 7:15 AM, Trieu Huynh wrote:
> From: Trieu Huynh <[email-masked]>
> 
> Commit 85127bcdea ("backfill: assume --sparse when sparse-checkout is
> enabled") intended for 'git backfill' to consult the repository
> configuration when the user does not pass '--sparse' or
> '--no-sparse' on the command line. It added the sentinel check:
> 
>      if (ctx->sparse < 0)
>          ctx->sparse = cfg->apply_sparse_checkout;
> 
> However, the ctx->sparse field is initialized to 0 instead of -1,
> so this guard never triggers. Consequently, the repository config
> (core.sparseCheckout) is never checked, and the command always
> performs a full backfill even when sparse-checkout is enabled.

Thanks for adding this context. This patch LGTM.

nit: it helps to reply to your previous version [1] so the history
of your patch series shows up in a single thread. No need to fix it
now because this version should be final. I'm a fan of using
GitGitGadget to avoid making these kinds of mistakes, but you can
use 'git send-email --in-reply-to=<id>' [2] in the future.

[1] https://lore.kernel.org/git/[email-masked]/

[2] 
https://git-scm.com/docs/git-send-email#Documentation/git-send-email.txt---in-reply-toidentifier

Thanks,
-Stolee