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

Re: [RFC PATCH 3/3] list-objects-filter: implement composite filters

From
Junio C Hamano <gitster@pobox.com>
Date
May 19, 2019, 01:12 UTC
Message-ID
<xmqq5zq72qof.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<1E174CAA-BD57-400B-A83B-4AABFAFBC04B@comcast.net>
Matthew DeVore <matvore@comcast.net> writes:
Show 20 quoted lines
> My justification for the URL-encoding scheme is:
> ...
> 3. Continuing to use a single filter line seemed the least
> disruptive considering both this codebase and Git clones like
> JGit. Other clones will likely fail saying "unknown filter
> combine:" or something like that until it gets implemented. A
> paranoid consideration is that clones and proprietary server
> implementations may currently allow the "filter" line to be
> silently overridden if it is repeated.
>
> 4. Assuming we *do* use a single filter line over the wire, it
> makes sense to allow the user to specify the raw filter line as
> well as have the more friendly UI of repeating --filter flags.
>
> 5. If we use repeated "filter" lines over the wire, and later
> start implementing a more complete DSL for specifying filters (see
> Mercurial's "revsets") the repeated-filter-line feature in the
> protocol may end up becoming deprecated and we will end up
> back-pedaling to allow integration of the "&" operator with
> whatever new operators we need.
OK, that's fair.
Show 7 quoted lines
> 1. Allow anything to be encoded. I chose this because it's how I
> usually think of URL encoding working. For instance, if I go to
> https://public-inbox.org/git/?q=cod%65+coverage in Chrome, the
> browser automatically decodes the %65 to an e in the address
> bar. Safari does not automatically decode, but the server
> apparently interprets the %65 as an e. I am not really attached to
> this choice.

OK, so the rule is "when you see 'combine:' (this part is never encoded), take the rest as a single string, separate it at '+' (these pluses are never encoded), and URLdecode each part---each of these parts is a filter", which totally makes sense. I somehow didn't see that clearly written in your description.

Previous: Matthew DeVoreNext: Matthew DeVore
Message 19 of 23 in “Proposal: object negotiation for partial clones”
  1. Matthew DeVoreApr 28, 2019
  2. Jonathan NiederMay 6, 2019
  3. Jonathan TanMay 6, 2019
  4. Jonathan NiederMay 6, 2019
  5. Matthew DeVoreMay 6, 2019
  6. Jonathan NiederMay 7, 2019
  7. Matthew DeVoreMay 6, 2019
  8. Jonathan TanMay 7, 2019
  9. Matthew DeVoreMay 7, 2019
  10. Jonathan TanMay 9, 2019
  11. Matthew DeVoreMay 14, 2019
  12. Jonathan NiederMay 14, 2019
  13. 0/3 implement composite filtersMatthew DeVore, May 16, 2019
  14. 1/3 list-objects-filter: refactor into a context structMatthew DeVore, May 16, 2019
  15. 2/3 list-objects-filter-options: error is localizeableMatthew DeVore, May 16, 2019
  16. 3/3 list-objects-filter: implement composite filtersMatthew DeVore, May 16, 2019
  17. Junio C HamanoMay 17, 2019
  18. Matthew DeVoreMay 17, 2019
  19. Junio C HamanoMay 19, 2019
  20. Matthew DeVoreMay 20, 2019
  21. Matthew DeVoreMay 20, 2019
  22. Jonathan TanMay 16, 2019
  23. Matthew DeVoreMay 17, 2019

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.