def get_commit_hash(reference, directory=None):
    # Track remote branch
    if branch_exists(reference, local_only=False, directory=directory):
        if not branch_exists(reference, local_only=True, directory=directory):
            track_branches(reference, directory)
    cmd = 'git show-branch --sha1-name ' + reference
    out = check_output(cmd, shell=True, cwd=directory)
    return out.split('[')[1].split(']')[0]
Drop an attribute from a composite type
dataset/ETHPy150Open ros-infrastructure/bloom/bloom/git.py/get_commit_hash--crossover with--dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_type.py/CompositeToSqlTestCase.test_drop_attribute