{# Expects `diff` (DiffSummary), `file_ref` (commit to link files at) and `base` (repo URL). #}
Showing {{ crate::web::fmt::plural(diff.files.len(), "changed file") }} with {{ crate::web::fmt::plural(diff.additions, "addition") }} and {{ crate::web::fmt::plural(diff.deletions, "deletion") }}. {% if diff.files.len() > 1 %} {% endif %}
{% for f in diff.files %}
+{{ f.additions }} −{{ f.deletions }} {{ f.display_path() }} {% if f.status != "modified" %}{{ f.status }}{% endif %} {% if f.status != "deleted" %} View file {% endif %}
{% if f.binary %}
Binary file not shown.
{% else if f.too_large %}
Large diff not rendered ({{ f.additions }} additions, {{ f.deletions }} deletions).
{% else if f.hunks.is_empty() %}
{% if f.status == "renamed" %}File renamed without changes.{% else %}No content changes.{% endif %}
{% else %}
{% for h in f.hunks %} {% for l in h.lines %} {% endfor %} {% endfor %}
{{ h.header }}
{% if let Some(n) = l.old_no %}{{ n }}{% endif %}{% if let Some(n) = l.new_no %}{{ n }}{% endif %}{{ l.marker() }}{{ l.html|safe }}
{% endif %}
{% endfor %} {% if diff.files.is_empty() %}

No file changes.

{% endif %}