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

Re: [RFC PATCH] upload-pack: fix filter options scope

From
Taylor Blau <me@ttaylorr.com>
Date
May 7, 2020, 16:42 UTC
Message-ID
<20200507164206.GB26677@syl.local>
In-Reply-To
<20200507144710.GA3063766@coredump.intra.peff.net>
On Thu, May 07, 2020 at 10:47:10AM -0400, Jeff King wrote:
Show 26 quoted lines
> On Thu, May 07, 2020 at 02:32:39PM +0200, Christian Couder wrote:
>
> > > A client who does this is stupid and wrong (and I didn't check the
> > > protocol spec, but it could very well be violating the spec). So I don't
> > > think it's _that_ big a deal. But it would be nice if all of those
> > > globals got moved into upload_pack_data, and both v1 and v2 just used it
> > > consistently.
> >
> > Unfortunately as I discuss a bit above 'struct upload_pack_data' is
> > not used by v1, only by v2. I think making v1 use upload_pack_data
> > might be nice, but it's a separate issue. So I am tempted to just
> > improve the commit message, adding some information from you and from
> > this discussion, and then re-sending.
> >
> > Another intermediate solution would be to add filter_options to
> > 'struct upload_pack_data' for v2 and to use filter_options directly
> > for v1.
>
> I think we do want the v1 path to use upload_pack_data in the long run,
> just to keep things less confusing.
>
> But if you don't want to go that far now, I'd strongly prefer the second
> option, pushing v2 towards how we ultimately want it to look, and
> plumbing a local variable through v1 paths as necessary. Or perhaps just
> renaming the global to filter_options_v1 or something, so that v2 code
> paths aren't tempted to use it.

I would be very much in favor of that direction. Thanks for CC-ing me on this thread, since any changes here will obviously create merge conflicts on my end when I send the "configure allowed object filters" patches.

> -Peff

Thanks, Taylor

Previous: Jeff KingNext: Christian Couder
Message 5 of 12 in “upload-pack: fix filter options scope”
  1. upload-pack: fix filter options scopeChristian Couder, May 7, 2020
  2. Jeff KingMay 7, 2020
  3. Christian CouderMay 7, 2020
  4. Jeff KingMay 7, 2020
  5. Taylor BlauMay 7, 2020
  6. upload-pack: fix filter options scopeChristian Couder, May 8, 2020
  7. Jeff KingMay 8, 2020
  8. Junio C HamanoMay 8, 2020
  9. Jeff KingMay 8, 2020
  10. Christian CouderMay 8, 2020
  11. Junio C HamanoMay 8, 2020
  12. upload-pack: clear filter_options for each v2 fetch commandChristian Couder, May 8, 2020

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.