def get_old_sha(diff_part):
    """
    Returns the SHA for the original file that was changed in a diff part.
    """
    r = re.compile(r'index ([a-fA-F\d]*)')
    return r.search(diff_part).groups()[0]