From: Josh Steadmon <steadmon@google.com>
To: git@vger.kernel.org
Subject: [RFC PATCH 0/1] Expand abbreviated filters
Date: Wed, 19 Dec 2018 15:21:17 -0800 [thread overview]
Message-ID: <cover.1545261186.git.steadmon@google.com> (raw)
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 reply other threads:[~2018-12-19 23:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 23:21 Josh Steadmon [this message]
2018-12-19 23:21 ` [RFC PATCH 1/1] filter-options: Expand abbreviated numbers Josh Steadmon
2019-01-02 23:15 ` Junio C Hamano
2019-01-07 21:25 ` Josh Steadmon
2019-01-07 22:12 ` Junio C Hamano
2019-01-07 22:18 ` Junio C Hamano
2019-01-08 0:17 ` [PATCH v2 0/1] Expand abbreviated filters Josh Steadmon
2019-01-08 0:17 ` [PATCH v2 1/1] filter-options: Expand abbreviated numbers Josh Steadmon
2019-01-09 12:23 ` SZEDER Gábor
2019-01-09 18:55 ` Josh Steadmon
2019-01-09 19:20 ` SZEDER Gábor
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=cover.1545261186.git.steadmon@google.com \
--to=steadmon@google.com \
--cc=git@vger.kernel.org \
/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).