{# ───────────────────────────────────────────── SPB Git — Personal Git Platform ───────────────────────────────────────────── Author : Simon-Pierre Boucher Contact : contact@spboucher.ai File : src/web/views/commit.njk Purpose : Single commit — full diff with per-file collapsible hunks License : MIT © Simon-Pierre Boucher ───────────────────────────────────────────── #}{% extends "layout.njk" %} {% block content %} {% include "partials/repo-header.njk" %}

{{ commit.subject }}

{% if commit.body %}
{{ commit.body }}
{% endif %}
{{ commit.authorEmail | identicon(24) }} {{ commit.authorName }} committed {{ commit.date | reltime }} ({{ commit.date | datefull }}) {% for parent in commit.parents %} parent {{ parent | truncate(7, true, '') }} {% endfor %}

Showing {{ commit.files.length }} changed file{{ 's' if commit.files.length != 1 }} with +{{ commit.additions | num }} and −{{ commit.deletions | num }}

{% for file in commit.files %}
{{ file.status }} {% if file.status == 'renamed' %}{{ file.oldPath }} → {% endif %}{{ file.newPath or file.oldPath }} +{{ file.additions }} −{{ file.deletions }} {% if file.binary %}

Binary file not shown.

{% else %}
{% for hunk in file.hunks %} {% for line in hunk.lines %} {% endfor %} {% endfor %}
{{ hunk.header }}
{{ line.old if line.old }} {{ line.new if line.new }} {{ '+' if line.type == 'add' else ('−' if line.type == 'del' else ' ') }}{{ line.html | safe }}
{% if file.truncated %}

Diff truncated — file too large.

{% endif %} {% endif %}
{% endfor %}
{% endblock %}