From: Junio C Hamano <gitster@pobox.com>
To: Josh Steadmon <steadmon@google.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH 1/1] filter-options: Expand abbreviated numbers
Date: Wed, 02 Jan 2019 15:15:24 -0800 [thread overview]
Message-ID: <xmqqsgyaircj.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <d324e7836928940a4df0b43da3ffeb8526feac61.1545261186.git.steadmon@google.com> (Josh Steadmon's message of "Wed, 19 Dec 2018 15:21:18 -0800")
Josh Steadmon <steadmon@google.com> writes:
> When communicating with a remote server or a subprocess, use expanded
> numbers rather than abbreviated numbers in the object filter spec (e.g.
> "limit:blob=1k" becomes "limit:blob=1024").
>
> Update the protocol docs to note that clients should always perform this
> expansion, to allow for more compatibility between server
> implementations.
>
> Signed-off-by: Josh Steadmon <steadmon@google.com>
> ---
> 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(-)
>
> diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
> index 09e4e0273f..d001372404 100644
> --- a/Documentation/technical/protocol-v2.txt
> +++ b/Documentation/technical/protocol-v2.txt
> @@ -296,7 +296,10 @@ included in the client's request:
> Request that various objects from the packfile be omitted
> using one of several filtering techniques. These are intended
> for use with partial clone and partial fetch operations. See
> - `rev-list` for possible "filter-spec" values.
> + `rev-list` for possible "filter-spec" values. Clients MUST
> + translate abbreviated numbers (e.g. "1k") into fully-expanded
> + numbers (e.g. "1024") on the client side, so that the server
> + does not need to implement unit parsing.
I suspect that it is too late now to retroactively say "MUST" here.
The best we may be able to do is to say "The sender SHOULD send a
plain integer without unit and the receiver SHOULD be prepared to
scale an integer with unit".
next prev parent reply other threads:[~2019-01-02 23:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 23:21 [RFC PATCH 0/1] Expand abbreviated filters Josh Steadmon
2018-12-19 23:21 ` [RFC PATCH 1/1] filter-options: Expand abbreviated numbers Josh Steadmon
2019-01-02 23:15 ` Junio C Hamano [this message]
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=xmqqsgyaircj.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=steadmon@google.com \
/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).