forgejo/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 Add some Unit-Tests (#14500) 2021-01-28 19:08:11 +01:00
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 Cron job to cleanup hook_task table (#13080) 2021-01-26 22:02:42 +01:00
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 [Refactor] CombinedStatus and CommitStatus related functions & structs (#14026) 2020-12-18 11:33:32 +08:00
graceful Fix windows build error (#14263) 2021-01-06 09:38:00 +08:00
hcaptcha
highlight
httpcache Use IsProd instead of testing if it's equal. (#14336) 2021-01-14 23:17:03 +02:00
httplib
indexer Reduce calls to git cat-file -s (#14682) 2021-02-17 22:32:25 +01:00
lfs Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
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 Add StatDir and replace com.StatDir (#14099) 2020-12-22 07:40:57 +08:00
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 Add mentionable teams to tributeValues and change team mention rules to gh's style (#13198) 2020-12-21 16:39:28 +01:00
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 Fix display since time round (#14226) 2021-01-28 13:29:22 +01:00
translation Fix locale init (#14582) 2021-02-05 22:41:45 +01:00
upload
uri Dump github/gitlab/gitea repository data to a local directory and restore to gitea (#12244) 2020-12-27 11:34:19 +08:00
user
util [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
validation Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
web Move middlewares to web/middleware (#14480) 2021-01-30 10:55:53 +02:00