All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: Calbabreaker <calbabreaker@gmail.com>, git@vger.kernel.org
Subject: Re: Memory leak with sparse-checkout
Date: Wed, 22 Sep 2021 15:16:22 -0400	[thread overview]
Message-ID: <98bd3b94-eb8d-b074-b89d-d86dcefaa995@gmail.com> (raw)
In-Reply-To: <YUpEX7mmZ0WPvbYK@nand.local>

On 9/21/2021 4:45 PM, Taylor Blau wrote:
> On Tue, Sep 21, 2021 at 02:56:01PM -0400, Derrick Stolee wrote:
>>> I thought that it might have been related to your third patch to change
>>> how bad patterns are detected. But I ran the following script after
>>> applying each of your three patches individually:
>>>
>>>     rm -fr repo
>>>     git init repo
>>>     cd repo
>>>
>>>     git sparse-checkout init
>>>     git sparse-checkout add foo
>>>     git sparse-checkout init --cone
>>>     git sparse-checkout add foo
>>>
>>> and the only difference is that we started silently dropping the bad
>>> "foo" pattern after re-adding foo in cone-mode starting with the second
>>> patch.
>>
>> In patch 2, we "detect" that the old patterns were not in cone mode
>> because the core.sparseCheckoutCone config is false when parsing the
>> patterns, so use_cone_patterns is 0.
> 
> I fear that we're talking about different things. With your patches, if
> I munge my .git/info/sparse-checkout file, I can easily get something
> like:
> 
>   $ git.compile sparse-checkout list
>   warning: unrecognized pattern: 'foo'
>   warning: disabling cone pattern matching
> 
> to appear. But I'm wondering why the same doesn't happen when running
> `git sparse-checkout init --cone` while the existing sparse-checkout
> definition contains non-cone mode entries.

You don't get that warning because it's not trying to parse the
previous patterns using cone mode. Before my series, you would get
the warning in a _second_ run of "git sparse-checkout init --cone".

We should add a different warning for overwriting the existing
patterns.

Thanks,
-Stolee

  reply	other threads:[~2021-09-22 19:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 12:15 Memory leak with sparse-checkout Calbabreaker
2021-09-20 15:52 ` Taylor Blau
2021-09-20 16:29   ` Derrick Stolee
2021-09-20 16:42     ` Taylor Blau
2021-09-20 17:25       ` Derrick Stolee
2021-09-20 17:27         ` Derrick Stolee
2021-09-20 19:08           ` Taylor Blau
2021-09-20 20:56             ` Derrick Stolee
2021-09-20 21:20               ` Taylor Blau
2021-09-21 12:55                 ` Derrick Stolee
2021-09-21 16:32                   ` Taylor Blau
2021-09-21 18:56                     ` Derrick Stolee
2021-09-21 20:45                       ` Taylor Blau
2021-09-22 19:16                         ` Derrick Stolee [this message]
2021-09-22 19:37                           ` Taylor Blau

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=98bd3b94-eb8d-b074-b89d-d86dcefaa995@gmail.com \
    --to=stolee@gmail.com \
    --cc=calbabreaker@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.