]> arthur.barton.de Git - bup.git/commit
options.py: clean up handling of --no-* options.
authorAvery Pennarun <apenwarr@gmail.com>
Mon, 19 Mar 2012 18:58:45 +0000 (14:58 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 19 Mar 2012 20:40:13 +0000 (16:40 -0400)
commita40b7d7e024ad90f70c6f20c7e65a9b057db433e
tree0b89bb2cb21154d75a34ea3ed4c73eec58de6423
parentb0b2171510ae41d17db00821fbb9d4fe15c74314
options.py: clean up handling of --no-* options.

The particular bug that triggered this (in a project other than bup) was of
the form:

n,no-stupid       don't be stupid

Where it would actually end up setting stupid=1 by accident, and -n would
mean --stupid, not --no-stupid.  As part of fixing it, you can now also do
this:

n,no-stupid,smart   don't be stupid (ie. be smart)

and it'll work as it should: n == smart == no-stupid == not stupid.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/options.py
lib/bup/t/toptions.py