All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Git Users <git@vger.kernel.org>
Subject: [suggestion] support non-negative float number in git-repack --max-pack-size
Date: Mon, 7 Jun 2021 13:42:47 +0700	[thread overview]
Message-ID: <776cb2f9-5fef-4486-5aef-f3ee62fcda7e@gmail.com> (raw)

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

             reply	other threads:[~2021-06-07  6:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  6:42 Bagas Sanjaya [this message]
2021-06-08  6:43 ` [suggestion] support non-negative float number in git-repack --max-pack-size 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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=776cb2f9-5fef-4486-5aef-f3ee62fcda7e@gmail.com \
    --to=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.