def get_hash_for_file(repo: Repo, path: Union[str, Path]) -> str:
    """ Returns the hash for the specified path.

    Equivalent to ``git rev-parse HEAD:X``

    :param repo: The repo to check in
    :param path: The path to a file or folder to get hash for
    :return: The hash
    """
    return repo.git.rev_parse(f"HEAD:{str(path)}")
Returns the hash for the specified path.

    Equivalent to ``git rev-parse HEAD:X``

    :param repo: The repo to check in
    :param path: The path to a file or folder to get hash for
    :return: The hash