Run a "git log ..." command, and return stdout

    args is anything which can be added after a normal "git log ..."
        it can be blank
    number, if true-ish, will be added as a "-n" option
    oneline, if true-ish, will add the "--oneline" option

def log(args, number=None, oneline=False, quiet=False):
    """Run a "git log ..." command, and return stdout

    args is anything which can be added after a normal "git log ..."
        it can be blank
    number, if true-ish, will be added as a "-n" option
    oneline, if true-ish, will add the "--oneline" option
    """
    options = ' '.join([
        number and str('-n %s' % number) or '',
        oneline and '--oneline' or ''
    ])
    try:
        return run('log %s %s' % (options, args), quiet=quiet)
    except UnknownRevision:
        return ''