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

[suggestion] support non-negative float number in git-repack --max-pack-size

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Jun 7, 2021, 06:42 UTC
Message-ID
<776cb2f9-5fef-4486-5aef-f3ee62fcda7e@gmail.com>
Hi,

I would like to create packfiles with charm-numbered size (that is for example use 49.99M instead of 50M) with git-repack:

$ git repack --max-pack-size=49.99M -a -d
But Git didn't support it:
> error: option `max-pack-size' expects a non-negative integer value with an optional k/m/g suffix
The workaround was scaling down to kibibytes:
$ git repack --max-pack-size=52418K -a -d

But the workaround is a rather convoluted to me, because I must convert mebibytes (MiB) to kibibytes (KiB). I had to multiply the desired packfile size by 1024, as opposed to by 1000 in familiar size notation (kilobytes [KB] and megabytes [MB]).

It would be nice if non-negative floating-point number can be allowed in --max-pack-size option, so that many users don't have to scale down size notation like above.

PS: charm numbers are most often used in pricing, because it's almost 
used everywhere (part of psychological pricing).
Thanks.
-- 
An old man doll... just what I always wanted! - Clara
Next: Jeff King
Message 1 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.