Use git rev-parse to return the top level of a repo

def _get_toplevel(path, user=None, password=None, output_encoding=None):
    '''
    Use git rev-parse to return the top level of a repo
    '''
    return _git_run(
        ['git', 'rev-parse', '--show-toplevel'],
        cwd=path,
        user=user,
        password=password,
        output_encoding=output_encoding)['stdout']