forgejo/services
zeripath 1062931cf1
Prevent NPE in CommentMustAsDiff if no hunk header (#1519) (#15201)
Backport #15199

I do not understand how this can happen or why.

There is an apparent possibility for a comment.Patch to be missing a hunk header
- this should not happen and do not understand how. But it appears to happen on
1.13 at least in some case.

This PR will simply add a new section if the cursection is empty
thus preventing the NPE.

Fix #15198

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-04-01 14:30:44 -04:00
..
comments Send notifications for mentions in pulls, issues, (code-)comments (#14218) (#14221) 2021-01-03 15:44:40 +02:00
externalaccount Allow externalID to be UUID (#8551) 2019-10-17 10:06:28 +08:00
gitdiff Prevent NPE in CommentMustAsDiff if no hunk header (#1519) (#15201) 2021-04-01 14:30:44 -04:00
issue Send notifications for mentions in pulls, issues, (code-)comments (#14218) (#14221) 2021-01-03 15:44:40 +02:00
mailer fix mailIssueCommentBatch for pull request (#14252) (#14296) 2021-01-11 08:46:19 +08:00
mirror Fix branch/tag notifications in mirror sync (#13855) (#13862) 2020-12-05 23:30:28 -05:00
pull IsUserAllowedToUpdate should igonre if user is nil (#14886) 2021-03-04 21:28:28 +01:00
release Send webhook when tag is removed via Web UI (#14015) (#14019) 2020-12-16 18:24:02 +01:00
repository Re-enable transfer repo back from org to user account (#14807) 2021-02-26 11:08:09 +02:00
wiki Enforce setting HEAD in wiki to master (#13950) (#13961) 2020-12-12 17:21:26 +00:00