Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing parsing of diffs with empty neutral lines and diffs without co… #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jlahoda
Copy link

@jlahoda jlahoda commented Apr 3, 2020

…ntext.

Here, I tried to improve parsing of diffs:
-which have an empty neutral line. This sends the parser into a search which should determine if the line is a separator between diffs or a neutral line, and the parser often incorrectly decides it is a separator, which then leads to missing parts of the diff in the parsed data. The search is now improved so that if a new hunk or a from line or to line are found, then the empty line is interpreted as a neutral line. Empty neutral lines at the end of a file diff may still be ignored/considered separators, but that seems like a much smaller problems
-which don't have context - the end of diff detection failed to detect the start of the next diff; fixed by separating matchesEndPattern from the header detection, and properly handling the header immediately following a diff line.

@challarao
Copy link

@thombergs Hi, are you accepting any PRs on this repo? There seems to be some bugs but the issues or PRs are not being addressed. If you are not willing to maintain, may I request you to add a notice so that people will not vendor this in their dependency. If you would like to still keep this repo, if you are busy, I can give a hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants