def get_added_lines(patch):
    """
    Get lines added with a patch.
    (e.g., git diff between two versions of a file)
    :param patch: the content of the patch
    :return: the lines added by the patch
    """

    added_lines = ""

    lines = patch.split('\n')
    for line in lines:
        if line.startswith("+"):
            if not added_lines:  # empty
                added_lines = line[1:]
            else:  # append
                added_lines += line[1:] + "\n"

    return added_lines