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

patch_parse: handle patches without extended headers #5273

Merged
merged 1 commit into from
Oct 17, 2019

Conversation

dlax
Copy link
Contributor

@dlax dlax commented Oct 17, 2019

Extended header lines (especially the "index .. ") are
not required by "git apply" so it import patches. So we allow the
from-file/to-file lines (--- a/file\n+++ b/file) to directly follow the
git diff header.

This fixes #5267.

Extended header lines (especially the "index <hash>..<hash> <mode>") are
not required by "git apply" so it import patches. So we allow the
from-file/to-file lines (--- a/file\n+++ b/file) to directly follow the
git diff header.

This fixes libgit2#5267.
Copy link
Member

@pks-t pks-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks a lot for your pull request and the lovely test!

@pks-t pks-t merged commit c9464bf into libgit2:master Oct 17, 2019
@ddevault
Copy link
Contributor

Thanks!

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.

libgit2's patch parser could ignore missing `index [:hexdigit:]+..[:hexdigit:]+ lines
3 participants