git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [suggestion] support non-negative float number in git-repack --max-pack-size
@ 2021-06-07  6:42 Bagas Sanjaya
  2021-06-08  6:43 ` Jeff King
  2021-06-12  1:20 ` [suggestion] support non-negative float number in git-repack --max-pack-size Bagas Sanjaya
  0 siblings, 2 replies; 9+ messages in thread
From: Bagas Sanjaya @ 2021-06-07  6:42 UTC (permalink / raw)
  To: Git Users

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-06-18 15:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07  6:42 [suggestion] support non-negative float number in git-repack --max-pack-size Bagas Sanjaya
2021-06-08  6:43 ` Jeff King
2021-06-08  7:04   ` Junio C Hamano
2021-06-08  7:24     ` [PATCH] doc: warn people against --max-pack-size Jeff King
2021-06-17 17:02       ` Philip Oakley
2021-06-18 13:26         ` Jeff King
2021-06-18 15:15           ` Philip Oakley
2021-06-18 15:18             ` Jeff King
2021-06-12  1:20 ` [suggestion] support non-negative float number in git-repack --max-pack-size Bagas Sanjaya

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).