Skip to content

Implement parsing of lines with extended patch info#46

Merged
matiasb merged 2 commits intomatiasb:masterfrom
volo-zyko:parse_patch_info_lines
Sep 12, 2017
Merged

Implement parsing of lines with extended patch info#46
matiasb merged 2 commits intomatiasb:masterfrom
volo-zyko:parse_patch_info_lines

Conversation

@volo-zyko
Copy link
Copy Markdown
Contributor

@volo-zyko volo-zyko commented Jul 30, 2017

Now lines below are also parsed and added to PatchedFile

diff --git a/added_file b/added_file
new file mode 100644
index 0000000..9b710f3

Additionally unidiff now better parses empty lines within hunks (some editors may remove trailing spaces which is not a problem for GNU patch)

Also conversion to string now produces same diff as it was originally. This might be helpful for those who needs validating diffs/remove some irrelevant info/fix empty lines in hunks and save diff back to file.

Beside that, make parsing a bit stricter, fix code for conversion
to string in a number of places so that original and resulting diffs
are the same now, add more tests.
@matiasb
Copy link
Copy Markdown
Owner

matiasb commented Sep 7, 2017

Great! Thanks, and sorry for the delayed ack. Will take a look soon.

@matiasb matiasb merged commit 2e3b11a into matiasb:master Sep 12, 2017
@matiasb
Copy link
Copy Markdown
Owner

matiasb commented Sep 12, 2017

Merged. Thanks a lot! 👍

@volo-zyko volo-zyko deleted the parse_patch_info_lines branch September 15, 2017 21:07
@volo-zyko
Copy link
Copy Markdown
Contributor Author

Thank you.

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