]> arthur.barton.de Git - bup.git/commit - lib/bup/git.py
git: use git's int parsing with pack.packSizeLimit config
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 9 Jan 2020 12:27:35 +0000 (13:27 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 13 Jun 2021 16:32:17 +0000 (11:32 -0500)
commitf80049d64c082674718372cf4b872d47eab14e19
tree00dbf2a35b8c1986f65999e9fbd38fc80485511f
parentc4a341c5c68c95a83e8f0b5fb34dcac09c96186c
git: use git's int parsing with pack.packSizeLimit config

Our parse_num() understands a little more than git, in particular
 * T for terabytes
 * b suffix when you specify Kb, Mb, Gb or Tb.

Neither of those are understood by git, it only understands the
K, M and G suffixes (case-insensitive). However, a git repository
that actually states 'pack.packSizeLimit' as something that git
doesn't understand is broken for every single git command, and as
we call git, the added flexibility of parse_num() cannot be used.

Thus, simplify the code and just use opttype='int' for this.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/git.py