]> arthur.barton.de Git - bup.git/commit
git: allow config retrieval as bool or int
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 8 Jan 2020 21:48:25 +0000 (22:48 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 13 Jun 2021 16:32:17 +0000 (11:32 -0500)
commitc4a341c5c68c95a83e8f0b5fb34dcac09c96186c
tree90fa72e79986fd50a9a1c05dc976dc469e750faf
parent81ac722759e54e6503dfcded5b4dc65ec9309250
git: allow config retrieval as bool or int

Allow retrieving configuration values as bool or int,
letting 'git config' normalize all the values instead
of trying to do it ourselves in bup.

Also use git config --null to avoid having to worry about
any whitespace issues, although .strip() on the output
would probably work just as well. Previously, the result
would include a terminating newline written out by the
git config command, which is not desirable.

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