Open steadmon opened 2 years ago
This is obviously a bug, but fixing this is going to be tricky. It's tough to find a heuristic that reliably works here unfortunately, at least in a VCS independent manner. I wonder how git-am
would fare with this...
Another complexity is that we still support CVS diffs. If you look at the state machine in the parser code, you'll see that a line starting with diff moves us into a new state, but we don't have code to move us back out into regular comment state - it just keeps accumulating until it finds the 'real' start to the diff. That's probably what we need to fix.
Yeah, we might want to look at splitting out the parsing logic into something Git specific (git-format-patch
generated) and something more generic
Example here: https://patchwork.kernel.org/project/git/patch/a4320f2fcf35f180e1c585be4105194f1555a874.1650448612.git.gitgitgadget@gmail.com/
It looks like Patchwork treats the first line matching /^diff/ as the start of the patch, even if that line is actually part of the commit message.