Pull refspec from remote repository to local

    If refspec is left as None, then pull current branch
    The '--rebase' option is used unless rebase is set to false

def pull(rebase=True, refspec=None):
    """Pull refspec from remote repository to local

    If refspec is left as None, then pull current branch
    The '--rebase' option is used unless rebase is set to false
    """
    options = rebase and '--rebase' or ''
    output = run('pull %s %s' % (options, refspec or ''))
    return not re.search('up.to.date', output)