~sircmpwn/lists.sr.ht#195: 
Some emails are not recognized as patches

Here is an example: https://lists.sr.ht/~rjarry/dlrepo/%3C20220127170900.356670-1-robin%40jarry.cc%3E

This may have to do with the diff stat being truncated to 80 columns. Git does that when stdout is not connected to a terminal:

https://git-scm.com/docs/git-format-patch#Documentation/git-format-patch.txt---statltwidthgtltname-widthgtltcountgt

Status
REPORTED
Submitter
~rjarry
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
No labels applied.

~rjarry 2 years ago

This seems like a pygit2/libgit2 issue. Here is a simple reproducer:

>>> import pygit2
>>> import requests
>>> body = requests.get('https://lists.sr.ht/~rjarry/dlrepo/%3C20220127170900.356670-4-robin%40jarry.cc%3E/raw').text
>>> pygit2.Diff.parse_diff(body)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_pygit2.GitError: invalid patch header at line 119
Register here or Log in to comment, or comment via email.