1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-07 10:44:26 +00:00
gitea/services
zeripath be25afc6de
Fix a couple of CommentAsPatch issues. (#14804) (#14820)
Backport #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

* 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

* 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-28 15:19:51 +02:00
..
comments Send notifications for mentions in pulls, issues, (code-)comments (#14218) (#14221) 2021-01-03 15:44:40 +02:00
externalaccount Allow externalID to be UUID (#8551) 2019-10-17 10:06:28 +08:00
gitdiff Fix a couple of CommentAsPatch issues. (#14804) (#14820) 2021-02-28 15:19:51 +02:00
issue Send notifications for mentions in pulls, issues, (code-)comments (#14218) (#14221) 2021-01-03 15:44:40 +02:00
mailer fix mailIssueCommentBatch for pull request (#14252) (#14296) 2021-01-11 08:46:19 +08:00
mirror Fix branch/tag notifications in mirror sync (#13855) (#13862) 2020-12-05 23:30:28 -05:00
pull Fix a couple of CommentAsPatch issues. (#14804) (#14820) 2021-02-28 15:19:51 +02:00
release Send webhook when tag is removed via Web UI (#14015) (#14019) 2020-12-16 18:24:02 +01:00
repository Re-enable transfer repo back from org to user account (#14807) 2021-02-26 11:08:09 +02:00
wiki Enforce setting HEAD in wiki to master (#13950) (#13961) 2020-12-12 17:21:26 +00:00