Prevent NPE on invalid diff #17197

Merged
lunny merged 2 commits from prevent-npe-17193 into main 2021-09-30 19:31:02 +00:00
Contributor

If ParseCompareInfo returns a nil compare info the defer function needs to ensure
that it does not attempt to close the HeadGitRepo.

Fix #17193
Regression #16635

Signed-off-by: Andrew Thornton art27@cantab.net

If ParseCompareInfo returns a nil compare info the defer function needs to ensure that it does not attempt to close the HeadGitRepo. Fix #17193 Regression #16635 Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 (Migrated from github.com) approved these changes 2021-09-30 16:34:59 +00:00
jolheiser approved these changes 2021-09-30 16:35:46 +00:00
6543 (Migrated from github.com) reviewed 2021-09-30 16:55:08 +00:00
6543 (Migrated from github.com) commented 2021-09-30 16:55:07 +00:00
	resp = session.MakeRequest(t, req, http.StatusNotFound)
```suggestion resp = session.MakeRequest(t, req, http.StatusNotFound) ```
6543 (Migrated from github.com) approved these changes 2021-09-30 16:55:18 +00:00
6543 (Migrated from github.com) approved these changes 2021-09-30 17:01:06 +00:00
6543 (Migrated from github.com) left a comment

lgtm bot?

lgtm bot?
KN4CK3R (Migrated from github.com) approved these changes 2021-09-30 18:01:47 +00:00
This repo is archived. You cannot comment on pull requests.
No Milestone
No project
No Assignees
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#17197
No description provided.