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

Re: [PATCH] doc: warn people against --max-pack-size

From
Philip Oakley <philipoakley@iee.email>
Date
Jun 18, 2021, 15:15 UTC
Message-ID
<de7239bc-d68e-c9f5-1c97-87df24cfe7b1@iee.email>
In-Reply-To
<YMye+mkRPD0BkULX@coredump.intra.peff.net>
On 18/06/2021 14:26, Jeff King wrote:
Show 11 quoted lines
> On Thu, Jun 17, 2021 at 06:02:27PM +0100, Philip Oakley wrote:
>
>> On 08/06/2021 08:24, Jeff King wrote:
>>> +The minimum size allowed is limited to 1 MiB. The default is unlimited.
>>> +Common unit suffixes of 'k', 'm', or 'g' are supported.
>> Do we want to include the workaround of scaling in kibibytes (as
>> originally mentioned by Bagas) for the default as 1024k? This also
>> avoids the easy mistake that the size is in multiples MiB.
> I'm not quite sure what you're asking. If you mean: should we tell
> people that they can't use "4.9m" and should instead use "5017k"
> instead, then I don't have a strong opinion.
Sorry, I should have included an example based on the patch
> +The minimum size allowed is limited to 1 MiB. The default is unlimited.
> +Common unit suffixes of 'k', 'm', or 'g' are supported.
e.g.

+The default is unlimited. Common unit suffixes of 'k', 'm', or 'g' are +supported. The minimum size allowed is limited to 1 MiB (`1024k`).

I swapped the sentence order to allow the scaled example of the minimum to be after the explanation of the suffixes

Show 11 quoted lines
>
> It might help some people. But OTOH it's not clear to me that this is a
> common question, so it might clutter up the documentation. Either way,
> it's orthogonal to the patch in question, and should come on top if
> somebody cares to work on it.
>
> I'd also be fine with somebody actually implementing fractional unit
> support (it would probably go into git_parse_signed() and
> git_parse_unsigned()). It doesn't seem worth the effort to me, but if
> somebody feels strongly enough to implement it cleanly, I wouldn't say
> no. :)

I'd agree about not offering fractional values, but showing the use of smaller units was an easy tweak.

Philip
Previous: Jeff KingNext: Jeff King
Message 7 of 9 in “[suggestion] support non-negative float number in git-repack --max-pack-size”
  1. Bagas SanjayaJun 7, 2021
  2. Jeff KingJun 8, 2021
  3. Junio C HamanoJun 8, 2021
  4. doc: warn people against --max-pack-sizeJeff King, Jun 8, 2021
  5. Philip OakleyJun 17, 2021
  6. Jeff KingJun 18, 2021
  7. Philip OakleyJun 18, 2021
  8. Jeff KingJun 18, 2021
  9. Bagas SanjayaJun 12, 2021

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.