aha. well, this commit has a pretty different implementation of the
mailmap support, and i don't know what the oversight or backtrace are.
so maybe this one works? if i can reproduce the issue i can try to get
it fixed.
On Mon Jan 29, 2024 at 8:57 PM CET, aoife cassidy wrote:
> aha. well, this commit has a pretty different implementation of the> mailmap support, and i don't know what the oversight or backtrace are.> so maybe this one works? if i can reproduce the issue i can try to get> it fixed.
If I recall correctly, there was a repository whose author writes
commits with an empty git user.email address (resulting in
"Full Name <>"):
https://git.sr.ht/~rj/sgr
This causes the following backtrace with the earlier patch:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/lib/python3.9/site-packages/gitsrht/blueprints/repo.py", line 156, in summary
return render_template("summary.html", view="summary",
File "/usr/lib/python3.9/site-packages/flask/templating.py", line 147, in render_template
return _render(
File "/usr/lib/python3.9/site-packages/flask/templating.py", line 128, in _render
rv = template.render(context)
File "/usr/lib/python3.9/site-packages/jinja2/environment.py", line 1304, in render
self.environment.handle_exception()
File "/usr/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/usr/lib/python3.9/site-packages/gitsrht/templates/summary.html", line 2, in top-level template code
{% import "utils.html" as utils with context %}
File "/usr/lib/python3.9/site-packages/gitsrht/templates/repo.html", line 1, in top-level template code
{% extends "layout.html" %}
File "/usr/lib/python3.9/site-packages/srht/templates/layout.html", line 46, in top-level template code
{% block body %}
File "/usr/lib/python3.9/site-packages/gitsrht/templates/repo.html", line 102, in block 'body'
{% block content %}{% endblock %}
File "/usr/lib/python3.9/site-packages/gitsrht/templates/summary.html", line 38, in block 'content'
{{ utils.commit_event(repo, c) }}
File "/usr/lib/python3.9/site-packages/jinja2/runtime.py", line 828, in _invoke
rv = self._func(*arguments)
File "/usr/lib/python3.9/site-packages/gitsrht/templates/utils.html", line 96, in template
{% set author = repo.author(c) %}
File "/usr/lib/python3.9/site-packages/gitsrht/types/__init__.py", line 152, in author
return self.git_repo.author(obj)
File "/usr/lib/python3.9/site-packages/gitsrht/git.py", line 128, in author
return self._mailmap.resolve_signature(sig)
ValueError: failed to parse signature - Signature cannot have an empty name or email