{% extends "repo.html" %} {% import "utils.html" as utils with context %} {% block title %} {{repo.owner.canonical_name}}/{{repo.name}}: {{trim_commit(commit.message)}} - {{cfg("sr.ht", "site-name")}} git {% endblock %} {% block content %}
{{ utils.commit_event(repo, commit, full_body=True, full_id=True, refs=refs, parents=True) }}
{{diffstat(diff)}}
{# God, working with
 tags is such a fucking mess #}
        {% for patch in diff %}
        
{#
          #}{{patch.delta.status_char()}} {% if parent %}{{patch.delta.old_file.path}}{#
         #}{% endif %} => {#
         #}{{patch.delta.new_file.path}}{#
         #} +{{patch.line_stats[1]}}{#
         #} -{{patch.line_stats[2]}}{%
            if patch.delta.old_file.mode != patch.delta.new_file.mode %}{#
          #}{#
          #}{% endif %}
{% for hunk in patch.hunks %}
{% set hunk_index = loop.index %}@@ {#
#}{% if parent %}{{hunk.old_start}},{{hunk.old_lines}} {#
#}{% endif %}{{hunk.new_start}},{{hunk.new_lines}} {#
#}@@{% if hunk.old_start == 0 %}
{% endif %}{% for line in hunk.lines
%}{{line.origin}}{%
  if loop.first and hunk.old_start != 0
%}{{line.content.lstrip()}}{%
  else
%} {{line.content}}{%
  endif
%}{% endfor %}
{% endfor %}
{% endfor %}
{% endblock %}