Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Trieu Huynh <vikingtc4@gmail.com>,  git@vger.kernel.org
Subject: Re: [GSoC PATCH v2] backfill: auto-detect sparse-checkout from config
Date: Mon, 06 Apr 2026 09:27:41 -0700	[thread overview]
Message-ID: <xmqqjyukcav6.fsf@gitster.g> (raw)
In-Reply-To: <e16edc29-a281-42f8-a712-4114d6a3288c@gmail.com> (Derrick Stolee's message of "Sat, 4 Apr 2026 13:36:52 -0400")

Derrick Stolee <stolee@gmail.com> writes:

> On 4/4/26 7:15 AM, Trieu Huynh wrote:
>> From: Trieu Huynh <vikingtc4@gmail.com>
>> 
>> 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.

Yup, thanks, both of you.  The original patch without this
explanation may not be so obvious but after taking a look at what
that commit did, it is very clear what went wrong.


      reply	other threads:[~2026-04-06 16:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-04 11:15 [GSoC PATCH v2] backfill: auto-detect sparse-checkout from config Trieu Huynh
2026-04-04 17:36 ` Derrick Stolee
2026-04-06 16:27   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqjyukcav6.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=stolee@gmail.com \
    --cc=vikingtc4@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox