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 Exclude generated files from language statistics (#11653) 2020-05-29 09:20:01 +03:00
auth Move middlewares to web/middleware (#14480) 2021-01-30 10:55:53 +02:00
avatar Avatars and Repo avatars support storing in minio (#12516) 2020-10-14 21:07:51 +08:00
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 Ensure that the detected charset order is set in chardet test (#12574) 2020-08-23 14:15:29 +01:00
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 Fix emoji detection in certain cases (#12320) 2020-07-25 16:40:04 +03:00
eventsource Move EventSource to SharedWorker (#12095) 2020-07-03 10:55:36 +01:00
forms Add Password Algorithm option to install page (#14701) 2021-02-16 23:37:20 +01:00
generate Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
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 hCaptcha Support (#12594) 2020-10-02 23:37:53 -04:00
highlight Use existing analyzer module for language detection for highlighting (#13522) 2020-11-13 16:13:41 -05:00
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 Add Allow-/Block-List for Migrate & Mirrors (#13610) 2020-11-28 19:37:58 -05:00
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 Check passwords against HaveIBeenPwned (#12716) 2020-09-08 17:06:39 -05:00
pprof
private Fix send mail (#13312) 2020-10-26 12:42:27 -04:00
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 hCaptcha Support (#12594) 2020-10-02 23:37:53 -04:00
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 Attachments: Add extension support, allow all types for releases (#12465) 2020-10-05 01:49:33 -04:00
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 Fix Storage mapping (#13297) 2020-10-25 17:19:06 +00:00
structs Export LFS & TimeTracking function status (#14753) 2021-02-20 11:17:51 +01:00
svg Fix filepath basename on Windows for SVG bindata (#12241) 2020-07-13 21:16:40 +01:00
sync Fix missing unlock in uniquequeue (#9790) 2020-01-15 23:58:33 +02:00
task Migrations: Use Process Manager to create own Context (#13792) 2020-12-02 18:36:06 +00:00
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 Update golangci-lint to version 1.31.0 (#13102) 2020-10-11 21:27:20 +01:00
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 Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
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