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
..
2021-01-28 19:08:11 +01:00
2021-02-22 00:51:15 +08:00
2020-04-05 07:20:50 +01:00
2021-01-06 09:38:00 +08:00
2020-10-02 23:37:53 -04:00
2019-06-12 15:41:28 -04:00
2021-01-26 16:36:53 +01:00
2018-11-04 22:20:00 -05:00
2019-06-12 15:41:28 -04:00
2020-10-26 12:42:27 -04:00
2021-02-03 22:36:38 +01:00
2020-10-02 23:37:53 -04:00
2020-10-25 17:19:06 +00:00
2021-02-05 22:41:45 +01:00
2020-04-05 07:20:50 +01:00
2021-01-26 16:36:53 +01:00