0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-30 10:05:10 +01:00
gitea/modules/migrations
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
..
base Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
dump.go Fix repo-restore bug with poster not replaced (#14759) 2021-02-22 11:57:41 +08:00
error.go Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
git.go Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
gitea_downloader_test.go
gitea_downloader.go Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
gitea_uploader_test.go
gitea_uploader.go Fix a couple of CommentAsPatch issues. (#14804) 2021-02-27 19:46:14 +01:00
github_test.go
github.go Fix github download on migration (#14703) 2021-02-18 01:36:49 +01:00
gitlab_test.go
gitlab.go Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
gogs_test.go Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
gogs.go Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
main_test.go
migrate_test.go
migrate.go Add support to migrate from gogs (#14342) 2021-01-21 20:33:58 +01:00
restore.go Fix repo-restore bug with poster not replaced (#14759) 2021-02-22 11:57:41 +08:00
update.go