'Transform kwargs into git command line options
Callers can assume the following behavior:
Passing foo=None ignores foo, so that callers can
use default values of None that are ignored unless
set explicitly.
Passing foo=False ignore foo, for the same reason.
Passing foo={string-or-number} results in [\'--foo=<value>\']
in the resulting arguments.'

def transform_kwargs(self, **kwargs):

    args = []
    types_to_stringify = set(((ustr, float, str) + int_types))
    for (k, v) in kwargs.items():
        if (len(k) == 1):
            dashes = u'-'
            join = u''
        else:
            dashes = u'--'
            join = u'='
        type_of_value = type(v)
        if (v is True):
            args.append((u'%s%s' % (dashes, dashify(k))))
        elif (type_of_value in types_to_stringify):
            args.append((u'%s%s%s%s' % (dashes, dashify(k), join, v)))
    return args
