def parse_commit_log(name, content, releases, get_head_fn):
    """
    Parses the given commit log
    :param name: str, package name
    :param content: list, directory paths
    :param releases: list, releases
    :param get_head_fn: function
    :return: dict, changelog
    """
    log = ""
    raw_log = ""
    for path, _ in content:
        log += "\n".join(changelog(repository=GitRepos(path), tag_filter_regexp=r"v?\d+\.\d+(\.\d+)?"))
        raw_log += "\n" + subprocess.check_output(
            ["git", "-C", path, "--no-pager", "log", "--decorate"]).decode("utf-8")
        shutil.rmtree(path)
    log = parse(name, log, releases, get_head_fn)

    return log, raw_log
Parses the given commit log
    :param name: str, package name
    :param content: list, directory paths
    :param releases: list, releases
    :param get_head_fn: function
    :return: dict, changelog