forgejo/services
zeripath 3d8b5ad5f3
Fix a couple of CommentAsPatch issues. (#14804)
* CutDiffAroundLine makes the incorrect assumption that `---` and `+++` always represent part of the header of a diff.

This PR adds a flag to its parsing to prevent this problem and adds a streaming parsing technique to CutDiffAroundLine using an io.pipe instead of just sending data to an unbounded buffer.

Fix #14711

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Handle unquoted comment patch files

When making comment patches unfortunately the patch does not always quote the filename
This makes the diff --git header ambiguous again.

This PR finally adds handling for ambiguity in to parse patch

Fix #14812

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add in testing for no error

There is no way currently for CutDiffAroundLine in this test to cause an
error however, it should still be tested.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-02-27 19:46:14 +01:00
..
archiver migrate from com.* to alternatives (#14103) 2020-12-25 11:59:32 +02:00
comments Enhance Ghost comment mitigation Settings (#14392) 2021-01-21 21:56:19 -05:00
externalaccount Allow externalID to be UUID (#8551) 2019-10-17 10:06:28 +08:00
gitdiff Fix a couple of CommentAsPatch issues. (#14804) 2021-02-27 19:46:14 +01:00
issue label and milestone webhooks on issue/pull creation (#14363) 2021-01-17 16:15:57 +02:00
mailer Add dismiss review feature (#12674) 2021-02-11 18:32:25 +01:00
mirror [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
pull Fix a couple of CommentAsPatch issues. (#14804) 2021-02-27 19:46:14 +01:00
release Fix wrong publisher id (#14212) 2021-01-01 16:03:31 -05:00
repository migrate from com.* to alternatives (#14103) 2020-12-25 11:59:32 +02:00
webhook fix a small nit (#14769) 2021-02-22 19:54:01 +01:00
wiki migrate from com.* to alternatives (#14103) 2020-12-25 11:59:32 +02:00