Handle arguments to git commands

>>> GitArgs('-h', '--no-foo').args
['-h', '--no-foo']
>>> GitArgs('-n', 123).args
['-n', '123']
>>> GitArgs().add('--more-foo', '--less-bar').args
['--more-foo', '--less-bar']
>>> GitArgs().add(['--foo', '--bar']).args
['--foo', '--bar']
>>> GitArgs().add_cond(1 > 2, '--opt', '--no-opt').args
['--no-opt']
>>> GitArgs().add_true(True, '--true').args
['--true']
>>> GitArgs().add_false(True, '--true').args
[]
>>> GitArgs().add_false(False, '--false').args
['--false']
Method __init__ Undocumented
Method args Undocumented
Method add Add arguments to argument list
Method add_true Add I{args} if I{condition} is C{True}
Method add_false Add I{args} if I{condition} is C{False}
Method add_cond Add option I{opt} to I{alist} if I{condition} is C{True} else add I{noopt}.
def __init__(self, *args):
Undocumented
@property
def args(self):
Undocumented
def add(self, *args):
Add arguments to argument list
def add_true(self, condition, *args):
Add I{args} if I{condition} is C{True}

@param condition: the condition to test
@type condition: C{bool}
@param args: arguments to add
def add_false(self, condition, *args):
Add I{args} if I{condition} is C{False}

@param condition: the condition to test
@type condition: C{bool}
@param args: arguments to add
def add_cond(self, condition, opt, noopt=[]):
Add option I{opt} to I{alist} if I{condition} is C{True}
else add I{noopt}.

@param condition: condition
@type condition: C{bool}
@param opt: option to add if I{condition} is C{True}
@type opt: C{str} or C{list}
@param noopt: option to add if I{condition} is C{False}
@type noopt: C{str} or C{list}
API Documentation for git-buildpackage, generated by pydoctor at 2019-09-07 17:58:51.