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

Support non-strict patch application #30

Open
bluekeyes opened this issue Oct 25, 2021 · 0 comments
Open

Support non-strict patch application #30

bluekeyes opened this issue Oct 25, 2021 · 0 comments
Labels
applying Issues related to applying patches enhancement New feature or request

Comments

@bluekeyes
Copy link
Owner

Currently, an Applier can only apply patches in "strict" mode, where line numbers and context lines must match exactly. Git supports a more flexible model when applying patches that allow them to work in more situations, such as cherry-picking changes to different branches:

  • Look for matches on different lines near the lines in the patch
  • Look for matches with fewer lines of context
  • Look for matches ignoring certain types of whitespace changes

I think copying Git's whitespace normalization could get complicated, but it would be nice to at least support exact matches on different lines or matches with reduced context.

@bluekeyes bluekeyes added enhancement New feature or request applying Issues related to applying patches labels Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
applying Issues related to applying patches enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant