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

Re: [RFC PATCH 1/1] filter-options: Expand abbreviated numbers

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 7, 2019, 22:12 UTC
Message-ID
<xmqqva306rsy.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190107212517.GA54613@google.com>
Josh Steadmon <steadmon@google.com> writes:
Show 14 quoted lines
>> > -	`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".
>> 
>
> In that case, do you think we should also specify that units should be
> interpreted as powers-of-2 rather than powers-of-10?

If we do not document the number scaling elsewhere, then we certainly should, but I somehow doubt it.

Documentation/git-config.txt does list these explicitly where it talks about --type=int, but these human-readable scaled integers are also used in command line arguments as well, so we may want to find a central place that is clear to the readers that the description applies to all of them and move the description there.

Previous: Josh SteadmonNext: Junio C Hamano
Message 5 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.