From: Taylor Blau <me@ttaylorr.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Taylor Blau <me@ttaylorr.com>,
Calbabreaker <calbabreaker@gmail.com>,
git@vger.kernel.org
Subject: Re: Memory leak with sparse-checkout
Date: Mon, 20 Sep 2021 17:20:24 -0400 [thread overview]
Message-ID: <YUj7GN/qWhw67jyk@nand.local> (raw)
In-Reply-To: <427c6d86-f123-035e-b0e6-4a21598ed111@gmail.com>
On Mon, Sep 20, 2021 at 04:56:47PM -0400, Derrick Stolee wrote:
> >> I double-checked this to see how to fix this, and the 'list' subcommand
> >> already notices that the patterns are not in cone mode and reverts its
> >> behavior to writing all of the sparse-checkout file to stdout. It also
> >> writes warnings over stderr before that.
> >>
> >> There might not be anything pressing to do here.
> >
> > Hmm. I think we'd probably want the same behavior for init and any other
> > commands which could potentially overwrite the contents of the
> > sparse-checkout file.
>
> Could you elaborate on what you mean by "the same behavior"?
>
> Do you mean that "git sparse-checkout add X" should act as if cone mode
> is not enabled if the existing patterns are not cone-mode patterns?
>
> What exactly do you mean about "init" changing behavior here?
No, I was referring to your suggestion from [1] to add a warning from
"git sparse-checkout init --cone" when there are existing patterns which
are not in cone-mode.
> > Those may already call list routines internally, in which case I agree
> > that this is already taken care of. But if not, then I think we should
> > match list's behavior in the new locations, too.
>
> "list" interprets the 'struct pattern_list' in two different ways,
> depending on the use_cone_patterns member. They are static methods in
> the builtin code, not used by anything else.
Ah, bummer. I was hoping that they'd be used internally by init so that
it would automatically emit a warning in the case where a user's
existing patterns are not in cone mode.
Apologies for any confusion.
Thanks,
Taylor
[1]: https://lore.kernel.org/git/8a0ddd8e-b585-8f40-c4b1-0a51f11e6b84@gmail.com/
next prev parent reply other threads:[~2021-09-21 2:20 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 [this message]
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
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUj7GN/qWhw67jyk@nand.local \
--to=me@ttaylorr.com \
--cc=calbabreaker@gmail.com \
--cc=git@vger.kernel.org \
--cc=stolee@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).