-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return errors for empty text fragments (#29)
This fixes two issues: 1. Fragments with only context lines were accepted 2. Fragments with only a "no newline" marker caused a panic The panic was found by go-fuzz. While fixing that issue, I discovered the first problem with other types of empty fragments while comparing behavior against 'git apply'. Also extract some helper functions and modify the loop conditions to clean things up while making changes in this area.
- Loading branch information
Showing
2 changed files
with
48 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters