def get_unique_commit_hashes(ref_name, new_rev):
    git_command = ['git', 'rev-list', new_rev, '--abbrev-commit', '--reverse',
                   '--not']
    git_command.extend(get_excluded_branches(ref_name))
    return execute(git_command).strip().split('\n')
Returns a list of abbreviated commit hashes unique to ref_name.
dataset/ETHPy150Open reviewboard/rbtools/rbtools/hooks/git.py/get_unique_commit_hashes