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

[RFC PATCH 0/1] Expand abbreviated filters

From
Josh Steadmon <steadmon@google.com>
Date
Dec 19, 2018, 23:21 UTC
Message-ID
<cover.1545261186.git.steadmon@google.com>
NOTE: this patch is based on top of md/list-objects-filter-by-depth

Currently, git clients pass filter specs verbatim over the network and to subprocesses. We support various numeric abbreviations for parameters on these limits (via git_parse_ulong()), but other implementations may not support the same abbreviations (or may support them differently; e.g., should "1k" == 1000 or 1024?). It would be better to only pass fully-expanded numbers in this case, and keep the expansion logic completely on the client side.

This patch updates the protocol-v2 doc to specify that clients MUST expand abbreviations in filter specifications before passing them to other processes. It adds a new function "expand_list_objects_filter_spec()" in list-objects-filter-options.c that implements the expansion logic, and updates users of the filter_spec field to instead expand the spec first.

Josh Steadmon (1):
  filter-options: Expand abbreviated numbers
 Documentation/technical/protocol-v2.txt |  5 ++++-
 builtin/clone.c                         |  6 +++++-
 builtin/fetch.c                         |  7 ++++++-
 fetch-pack.c                            | 15 ++++++++++++---
 list-objects-filter-options.c           | 20 ++++++++++++++++++--
 list-objects-filter-options.h           | 17 +++++++++++++++--
 t/t6112-rev-list-filters-objects.sh     | 17 +++++++++++++++++
 transport-helper.c                      | 13 +++++++++----
 upload-pack.c                           |  7 +++++--
 9 files changed, 91 insertions(+), 16 deletions(-)
-- 
2.20.0.405.gbc1bbc6f85-goog
Next: Josh Steadmon
Message 1 of 11 in “Expand abbreviated filters”
  1. 0/1 Expand abbreviated filtersJosh Steadmon, Dec 19, 2018
  2. 1/1 filter-options: Expand abbreviated numbersJosh Steadmon, Dec 19, 2018
  3. Junio C HamanoJan 2, 2019
  4. Josh SteadmonJan 7, 2019
  5. Junio C HamanoJan 7, 2019
  6. Junio C HamanoJan 7, 2019
  7. 0/1 Expand abbreviated filtersJosh Steadmon, Jan 8, 2019
  8. 1/1 filter-options: Expand abbreviated numbersJosh Steadmon, Jan 8, 2019
  9. SZEDER GáborJan 9, 2019
  10. Josh SteadmonJan 9, 2019
  11. SZEDER GáborJan 9, 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.