Commit 7ca3544ae3822ff6cac221e7c064884cbf9fb5ab Parent: 4faf6fde7c8db9353edbc8dfc5e458b79a7b6bd7 Author: mcol <mcol@posteo.net> Date: 2021-11-26 01:09:22 +0000 Committer: mcol <mcol@posteo.net> Committed: 2021-11-26 01:09:22 +0000 Complete test for commits
test/templates/repo/commit.html Modified
@@ -1,6 +1,19 @@ {% extends "../title.html.include" -%} -{%- block title -%}{{ commit.id }}{%- endblock -%} +{%- block title -%}{{ commit }}{%- endblock -%} {% block body %} -commit +scope: commit +commit: {{ commit }} +commit.id: {{ commit.id }} +commit.title: {{ commit.title }} +commit.body: {{ commit.body }} +commit.message: {{ commit.message }} +commit.author: {{ commit.author }} +commit.committer: {{ commit.committer }} +commit.author_email: {{ commit.author_email }} +commit.committer_email: {{ commit.committer_email }} +commit.authored: {{ commit.authored }} +commit.committed: {{ commit.committed }} +commit.encoding: {{ commit.encoding }} +commit.parent: {{ commit.parent }} {% endblock %}
test/expected/gitserve/commit/0292014748caae952bbc8dd6225680d83c0a5135.html Modified
@@ -1,2 +1,15 @@ -0292014748caae952bbc8dd6225680d83c0a5135 -commit +Printy print template error messages +scope: commit +commit: Printy print template error messages +commit.id: 0292014748caae952bbc8dd6225680d83c0a5135 +commit.title: Printy print template error messages +commit.body: +commit.message: Printy print template error messages +commit.author: mcol +commit.committer: mcol +commit.author_email: mcol@posteo.net +commit.committer_email: mcol@posteo.net +commit.authored: 2021-11-25 00:05:26 +0000 +commit.committed: 2021-11-25 00:05:26 +0000 +commit.encoding: utf-8 +commit.parent: 143fdb3b66c85512696406fab8d3ba525bffc675
src/Types.hs Modified
@@ -74,7 +74,7 @@ toGVal :: Commit LgRepo -> GVal m toGVal commit = def - { asHtml = html . pack . show . commitLog $ commit + { asHtml = html . strip . T.takeWhile (/= '\n') . commitLog $ commit , asText = pack . show . commitLog $ commit , asLookup = Just . commitAsLookup $ commit }