patchew-project / patchew

A patch email tracking and testing system
MIT License
72 stars 24 forks source link

Incorrect extraction of diffstat #114

Closed bonzini closed 5 years ago

bonzini commented 5 years ago

https://patchew.org/QEMU/20190325155923.30987-1-pbonzini@redhat.com/

bonzini commented 5 years ago

Patch posted.

bonzini commented 5 years ago

Ironically, the patchew page for this patch shows another bug in diffstat extraction. My first version of the patch also bailed out at lines starting with "diff", but I was afraid that this could have false positives in the commit message. Maybe we could bail at "diff" if a diffstat was found before (i.e. ret != []).

We could also require a "---" line before the diffstat, but there are people that are using e.g. quilt instead of git format-patch and do not include such a line. Overall the remaining case seems like a minor issue.

famz commented 5 years ago

Maybe two consequent lines

diff ...
index ...

is better?

bonzini commented 5 years ago

--- is simpler and even better for avoiding false positives.

bonzini commented 5 years ago

I mean stopping at ---.

bonzini commented 5 years ago

Pushed to next.patchew.org just to see what it looks like, everything seems okay: