Re: [PATCH v2 02/10] packfile: allow content-limit for cat-file
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Sep 17, 2024, 10:10 UTC
- Message-ID
- <ZulVmP3pBEEajjr5@nand.local>
- In-Reply-To
- <20240827202359.M464972@dcvr>
On Tue, Aug 27, 2024 at 08:23:59PM +0000, Eric Wong wrote:
Show 20 quoted lines
> > > diff --git a/object-file.c b/object-file.c
> > > index 065103be3e..1cc29c3c58 100644
> > > --- a/object-file.c
> > > +++ b/object-file.c
> > > @@ -1492,6 +1492,12 @@ static int loose_object_info(struct repository *r,
> > >
> > > if (!oi->contentp)
> > > break;
> > > + if (oi->content_limit && *oi->sizep > oi->content_limit) {
> >
> > I cannot convince myself enough to say "content limit" is a great
> > name. It invites "limited by what? text files are allowed but
> > images are not?".
>
> Hmm... naming is a most difficult problem :<
>
> ->slurp_max? It could be ->content_slurp_max, but I think
> that's too long...
>
> Would welcome other suggestions...I don't have a huge problem with "content_limit" as a name, but perhaps "content_size_limit", "streaming_limit", or "streaming_threshold" (with a vague preference towards the latter) might be more descriptive? I dunno.
Thanks, Taylor