def get_remote_rev(proj_dir, remote_branch) :
    tokens = remote_branch.split('/')
    try :
        output = subprocess.check_output('git ls-remote {} {}'.format(tokens[0], tokens[1]), cwd=proj_dir, shell=True)
        # can return an empty string if the remote branch doesn't exist
        if output != '':
            return output.split()[0]
        else :
            return None
    except subprocess.CalledProcessError :
        log.error("failed to call 'git ls-remote'")
        return None

#-------------------------------------------------------------------------------
Assert that when the given buffer is passed to ``Connection.recv_into``
dataset/ETHPy150Open floooh/fips/mod/tools/git.py/get_remote_rev--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pyopenssl/OpenSSL/test/test_ssl.py/ConnectionRecvIntoTests._respects_length_test