git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Memory leak with sparse-checkout

From
Taylor Blau <me@ttaylorr.com>
Date
Sep 21, 2021, 20:45 UTC
Message-ID
<YUpEX7mmZ0WPvbYK@nand.local>
In-Reply-To
<3c9af4e9-f3db-99af-d875-fb11bc8a643e@gmail.com>
On Tue, Sep 21, 2021 at 02:56:01PM -0400, Derrick Stolee wrote:
Show 20 quoted lines
> > 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.

I could be holding it wrong, but I was unsuccessful in getting a warning out with the quoted script.

> Let's move the discussion to that thread so we can interleave the
> patches themselves.

Sure, if you want. I just found it easier to reply here since I can more readily quote the things I want to respond to.

Thanks, Taylor

Previous: Derrick StoleeNext: Derrick Stolee
Message 13 of 15 in “Memory leak with sparse-checkout”
  1. CalbabreakerSep 20, 2021
  2. Taylor BlauSep 20, 2021
  3. Derrick StoleeSep 20, 2021
  4. Taylor BlauSep 20, 2021
  5. Derrick StoleeSep 20, 2021
  6. Derrick StoleeSep 20, 2021
  7. Taylor BlauSep 20, 2021
  8. Derrick StoleeSep 20, 2021
  9. Taylor BlauSep 20, 2021
  10. Derrick StoleeSep 21, 2021
  11. Taylor BlauSep 21, 2021
  12. Derrick StoleeSep 21, 2021
  13. Taylor BlauSep 21, 2021
  14. Derrick StoleeSep 22, 2021
  15. Taylor BlauSep 22, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.