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

Prevent patch context being ignored (#4193) #4195

Open
wants to merge 1 commit into
base: 8.x
Choose a base branch
from

Conversation

phil-s
Copy link

@phil-s phil-s commented Sep 26, 2019

The initial 'git apply' command does not employ the -C option to allow
fuzzy context matching, so neither should the fallback 'patch' command
be allowed to use its default fuzz factor. Both commands should treat
context in a consistent manner.

By default 'patch' will allow a hunk to apply with only a single line
of the provided context matching either side, and by default drush make
will not show any of the output which indicates that such fuzzy matching
has taken place.

This makes it far too easy for inapplicable patches to be 'successfully'
(but incorrectly) applied, with no warning to the user.

The initial 'git apply' command does not employ the -C option to allow
fuzzy context matching, so neither should the fallback 'patch' command
be allowed to use its default fuzz factor.  Both commands should treat
context in a consistent manner.

By default 'patch' will allow a hunk to apply with only a single line
of the provided context matching either side, and by default drush make
will not show any of the output which indicates that such fuzzy matching
has taken place.

This makes it far too easy for inapplicable patches to be 'successfully'
(but incorrectly) applied, with no warning to the user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants