{% extends "repo-full.html" %} {% import "utils.html" as utils %} {% block title %} {{repo.owner.canonical_name}}/{{repo.name}} ({{ ref.decode("utf-8", "replace") }}): {{path_join(*path)}} blame - {{cfg("sr.ht", "site-name")}} git {% endblock %} {% block repohead %} {% endblock %} {% block content %}
{{ utils.breadcrumb(ref, commit.id, repo, path, entry, view, path_join, stat, pygit2, humanize) }}
{{commit.id.hex[:8]}} — {% set author_user = lookup_user(commit.author.email) %} {% if author_user %} {{commit.author.name}} {% else %} {{commit.author.name}} {% endif %} {{trim_commit(commit.message)}} {{ commit_time(commit) | date }}
{# This row has some weird styles going on. This prevents the page from scrolling horizontally #}
{% for i in range(
        editorconfig.max_line_length()) %} {% endfor %}
{% set lns = namespace(line_count=0) %}
        {%- for hunk in blame %}
          {%- set lns.line_count = lns.line_count + hunk.lines_in_hunk -%}
          {%- if hunk.final_committer -%}
          {%- set final_user = lookup_user(hunk.final_committer.email) -%}
          {%- else -%}
          {%- set final_user = None -%}
          {%- endif -%}
          
{# #}{{hunk.final_commit_id.hex[:8]}} {% if final_user -%} {{hunk.final_committer.name}}{% else -%} {{hunk.final_committer.name}}{% endif %} {{ "\n" * hunk.lines_in_hunk -}}
{%- endfor -%}
        {%- for hunk in blame -%}
          
        {%- endfor -%}
      
{% for l in range(lns.line_count) %}{{loop.index}}
{% endfor %}
{{ highlight_file(repo, ref, entry, data, blob.id.hex, commit.id.hex) }}
{% endblock %} {% block scripts %} {% endblock %}