-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Labels
issue/regressionIndicates a previously functioning feature or behavior that has broken or regressed after a changeIndicates a previously functioning feature or behavior that has broken or regressed after a changetype/bug
Milestone
Description
- Gitea version (or commit ref): 1.12.6
- Git version:
- Operating system: Ubuntu
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Log gist:
2020/11/17 10:12:48 ...ters/repo/compare.go:449:PrepareCompareDiff() [E] GetDiffRange: ParsePatch: Unexpected line in hunk: <line containing /// characters>
Description
When creating a PR with a file containing a "//" this will cause a 500 error page. Issue was introduced with #13157 (see services/gitdiff/gitdiff.go line 671).
Suggested solution: Even if this is considered not valid, it should only affect the specific file (For example with a text "Gitea can't generate a diff for this file"). It should not cause a 500 error page making it impossible to create PR.
This is similar to #13597 but seem to be related to LFS, so I decided to create a new issue.
Metadata
Metadata
Assignees
Labels
issue/regressionIndicates a previously functioning feature or behavior that has broken or regressed after a changeIndicates a previously functioning feature or behavior that has broken or regressed after a changetype/bug