0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 10:14:32 +01:00
gitea/modules
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
..
analyze
auth Move middlewares to web/middleware (#14480) 2021-01-30 10:55:53 +02:00
avatar
base
cache [Vendor] Update go-redis to v8.5.0 (#13749) 2021-02-10 21:28:32 +00:00
charset
context Fix go get (#14758) 2021-02-22 00:51:15 +08:00
convert [API] Add Restricted Field to User (#14630) 2021-02-18 16:25:35 +08:00
cron
doctor Prevent adding nil label to .AddedLabels or .RemovedLabels (#14623) 2021-02-10 10:50:44 +08:00
emoji
eventsource
forms Add Password Algorithm option to install page (#14701) 2021-02-16 23:37:20 +01:00
generate
git Fix a couple of CommentAsPatch issues. (#14804) 2021-02-27 19:46:14 +01:00
gitgraph
graceful
hcaptcha
highlight
httpcache
httplib
indexer Reduce calls to git cat-file -s (#14682) 2021-02-17 22:32:25 +01:00
lfs
log Update docs and comments to remove macaron (#14491) 2021-01-29 16:35:30 +01:00
markup Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999) 2021-02-19 22:36:43 +01:00
matchlist
metrics
migrations Fix a couple of CommentAsPatch issues. (#14804) 2021-02-27 19:46:14 +01:00
nosql [Vendor] Update go-redis to v8.5.0 (#13749) 2021-02-10 21:28:32 +00:00
notification Add dismiss review feature (#12674) 2021-02-11 18:32:25 +01:00
options
password
pprof
private
process Reduce data races (#14549) 2021-02-03 22:36:38 +01:00
public Update docs and comments to remove macaron (#14491) 2021-01-29 16:35:30 +01:00
queue Prevent race in PersistableChannelUniqueQueue.Has (#14651) 2021-02-13 20:02:09 +01:00
recaptcha
references
repofiles enhancement: add signoff option in commit form (#14516) 2021-01-29 16:57:45 +08:00
repository Ensure memcache TTL cannot be over 30 days (#14592) 2021-02-09 22:29:03 +00:00
secret
session Create DB session provider(based on xorm) (#13031) 2021-02-15 00:33:31 -05:00
setting Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999) 2021-02-19 22:36:43 +01:00
ssh Internal ssh server respect Ciphers, MACs and KeyExchanges settings (#14523) 2021-01-30 14:20:32 +01:00
storage
structs Export LFS & TimeTracking function status (#14753) 2021-02-20 11:17:51 +01:00
svg
sync
task
templates stopwatch notif: check if timetracking is enabled (#14750) 2021-02-20 00:06:56 +01:00
test Move middlewares to web/middleware (#14480) 2021-01-30 10:55:53 +02:00
timeutil
translation Fix locale init (#14582) 2021-02-05 22:41:45 +01:00
upload
uri
user
util [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
validation
web Move middlewares to web/middleware (#14480) 2021-01-30 10:55:53 +02:00